Home > Net >  Would like to ask if the Repository encapsulates the at the bottom of the case, using efcore even ta
Would like to ask if the Repository encapsulates the at the bottom of the case, using efcore even ta

Time:09-23

Baidu example is
 var users=dbContext. Users. Include (" Orders "). The where (u=& gt; User. Id==1); 
this Repository layer encapsulates the unable to gain access to dbContext how even after table? Another user. The Id==1 it's don't understand if you do not specify a value, how

Also an example of this is to construct modelbuilder, also didn't think of how to do

CodePudding user response:

Using linq

CodePudding user response:

Through the interface or attributes you DbContext or DbSet exposed not good,

CodePudding user response:

Users. The Include (" Orders ")
This is not the list?

You can also through linq
From a in dbContext. Users
Join in dbContext b. Order on,,,,,,,,,,,,,,,,,
List effect,
  •  Tags:  
  • C#
  • Related