-
Notifications
You must be signed in to change notification settings - Fork 913
Open
Description
更新插入模块都有主动释放,查询没有,是有什么设计在里面吗?对于EF还在学习中,有点没能理解这块内容。
YiShaAdmin/YiSha.Data/YiSha.Data.EF/Database/SqlServerDatabase.cs
Lines 280 to 287 in 8f298c9
public async Task<T> FindEntity<T>(object keyValue) where T : class | |
{ | |
return await dbContext.Set<T>().FindAsync(keyValue); | |
} | |
public async Task<T> FindEntity<T>(Expression<Func<T, bool>> condition) where T : class, new() | |
{ | |
return await dbContext.Set<T>().Where(condition).FirstOrDefaultAsync(); | |
} |
Metadata
Metadata
Assignees
Labels
No labels