• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






java小兵

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

2022年1月29日

dotnetcore EF 使用外键值但不引入join子句
摘要: 某些情况下,出于性能考虑,我们需要外键的id值,但不想使用join子句把引用类型都读进来。 class Book { public int Id { get; set; } public string Name { get; set; } public string Author { get; se 阅读全文
posted @ 2022-01-29 18:52 .net一小兵 阅读(55) 评论(0) 推荐(0)
 
dotnetcore EF one-to-many mapping
摘要: class Person { public int Id { get; set; } public string Name { get; set; } public int Age { get; set; } public DateTime Birthday { get; set; } public 阅读全文
posted @ 2022-01-29 10:42 .net一小兵 阅读(39) 评论(0) 推荐(0)
 
dotnetcore EF migration
摘要: migration命令需要安装Microsoft.EntityFrameworkCore.Tools dotnet add package Microsoft.EntityFrameworkCore.sqlserver --version 5.0.13 dotnet add package Micr 阅读全文
posted @ 2022-01-29 09:27 .net一小兵 阅读(116) 评论(0) 推荐(0)
 
dotnetcore EF (entity column definition, sql statement logging)
摘要: class Bird { public int Number { get; set; } public string Name { get; set; } public int Age { get; set; } } class BirdConfig : IEntityTypeConfigurati 阅读全文
posted @ 2022-01-29 08:51 .net一小兵 阅读(41) 评论(0) 推荐(0)