随笔分类 - EF Core
摘要:1、新建interface public interface ISoftDelete { public bool isdeleted { get; set; } } 2、需要使用到软删除的entity要继承这个interface 3、然后在DBContext的OnModelCreating中为每个继
阅读全文
摘要:在做单元测试的时候碰到以下报错: The instance of entity type 'XXX' cannot be tracked because another instance with the same key value for {'XX'} is already being trac
阅读全文