Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
因此,如果您使用实体框架,您首先要创建一个数据库上下文: https://learn.microsoft.com/en-us/ef/ef6/fundamentals/working-with-dbcontext。然后,您想要创建某种可以获取数据的存储库:
return await dbContext.test .Where(test => test.X == X) .Where(test => test.Y == Y) .Where(test => test.Z == Z) .FirstOrDefault();
但是请阅读并遵循 https://learn.microsoft.com/en-us/ef/ef6/ 应该会有很大帮助。
So if you are using entity framework you first want to make a db context: https://learn.microsoft.com/en-us/ef/ef6/fundamentals/working-with-dbcontext.Then you want to make some sort of repository where you can get your data:
But reading and following the fundamentals on https://learn.microsoft.com/en-us/ef/ef6/ should be a big help.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
因此,如果您使用实体框架,您首先要创建一个数据库上下文: https://learn.microsoft.com/en-us/ef/ef6/fundamentals/working-with-dbcontext。
然后,您想要创建某种可以获取数据的存储库:
但是请阅读并遵循 https://learn.microsoft.com/en-us/ef/ef6/ 应该会有很大帮助。
So if you are using entity framework you first want to make a db context: https://learn.microsoft.com/en-us/ef/ef6/fundamentals/working-with-dbcontext.
Then you want to make some sort of repository where you can get your data:
But reading and following the fundamentals on https://learn.microsoft.com/en-us/ef/ef6/ should be a big help.