An asynchronous method in EF Core AnyAsync
But in the System. Linq, there is no asynchronous AnyAsync, only Any
If I had Any outside add Task. Factory. StartNew, the effect of EF Core AnyAsync does
Public async Task Login (string name, string PWD)
{
Return await Task. Factory. StartNew (()=& gt; BaseDal. Method GetEntities (.) Any (u=& gt; U.N ame==name & amp; & U.P wd==PWD));
}
Because EF Core belong to DAL layer, and the Login method belongs to the Service layer, is not possible to introduce EF Core Service layer
Or is it write some logic DAL layer?
CodePudding user response:
Code running effect can see it that way, but the actual effect need to look at the source code, how to deal with the internal
Internal request because he is likely to be completely asynchronous,
CodePudding user response:
Reference