For methods returning a non-generic Task we should always use Task.FromResult(true)
@benaadams Yeah, that's even better
Use Task.CompletedTask
Unable to find any other place where we are returning non-generic task and not using Task.CompletedTask.
Close?
Who will update that one reference? :trollface:
Well I'm technically assigned to it, so......
Unassigned. I think we can leave it to good-first-issue or if someone in the team wants to do this.
@smitpatel Can I take on this issue? Also should the following Task.FromResult(0) references be replaced as well, as the methods are returning non-generic Task?
https://github.com/aspnet/EntityFrameworkCore/blob/567a2e94d5a764c61ac2ddb364e9e74a356f0b75/src/EFCore.Relational/Storage/RelationalDatabaseCreator.cs#L94
https://github.com/aspnet/EntityFrameworkCore/blob/567a2e94d5a764c61ac2ddb364e9e74a356f0b75/src/EFCore.Relational/Storage/RelationalDatabaseCreator.cs#L115
@AsifulNobel - Go ahead. Yes, those methods should also be updated. I must have missed them in GitHub search. Update all the methods which are returning non-generic task and using Task.FromResult(0)
Most helpful comment
Use
Task.CompletedTask