随笔分类 -  EfCore

EntityFrameworkCore的一些随笔
摘要:如:PanelSummary这个Entity已经被其他Project进行了Migration,当前Project需要使用到此Entity,在EfCore的DbContext中可以这样设置即可: protected override void OnModelCreating(ModelBuilder 阅读全文
posted @ 2021-10-30 11:23 北月、大魔王 阅读(56) 评论(1) 推荐(1) 编辑
摘要:实体: /// <summary> /// 具有UserId和RoleId联合组件的实体 /// </summary> public class GctUserRoles { public int UserId { get; set; } public int RoleId { get; set; 阅读全文
posted @ 2021-10-30 11:12 北月、大魔王 阅读(871) 评论(0) 推荐(1) 编辑
摘要:如下,在实体中,如果想将Description字段设置为Clob类型的,在字段上添加Column的特性以及对应的TypeName即可 [Column(TypeName = "CLOB")] public string Description { get; set; } 阅读全文
posted @ 2021-10-30 11:02 北月、大魔王 阅读(377) 评论(0) 推荐(2) 编辑

点击右上角即可分享
微信分享提示