摘要:https://sebnilsson.com/blog/linq-distinct-method-using-lambda-expression/
阅读全文
随笔分类 - entity framework
摘要:https://sebnilsson.com/blog/linq-distinct-method-using-lambda-expression/
阅读全文
摘要:除了code first和db first外,下面的直接调用比较方便: https://dotnetthoughts.net/how-to-execute-a-stored-procedure-with-entity-framework-code-first/ 解决,增加一个参数的灵活性 https
阅读全文
摘要:https://stackoverflow.com/questions/26664431/moq-entity-frameworks-executesqlcommand
阅读全文
摘要:https://stackoverflow.com/questions/38475290/linq-to-entities-datetime-compare/38475344return context.Events .Any(x => x.UserId == id && x.Date > date
阅读全文
摘要:https://www.bbsmax.com/A/VGzleDmwJb/
阅读全文
摘要:https://www.infoworld.com/article/3085390/how-to-handle-concurrency-conflicts-in-entity-framework.html
阅读全文
摘要:1. 本地数据库连接 server name可以从链接字符串中取: (localdb)\MSSQLLocalDB 注意少写一个\. 2.新增连接 (localdb)\mssqllocaldb 3.修改连接 修改数据库名称,可以连接到具体的数据库里
阅读全文
摘要:1. dotnet ef相关命令 删除数据库(适合只有一个数据库的情形) dotnet ef database drop --force 更新数据库(适合只有一个数据库的情形) dotnet ef database update 如果多个数据库,则需更改: 首先,查看有哪些数据库context: 在
阅读全文
|