摘要:
TransactionScopeFilter [AttributeUsage(AttributeTargets.Method)] public class TransactionalSupportAttribute : Attribute { } public class TransactionSc 阅读全文
摘要:
// 在program.cs中加入这句,加入缓存支持 builder.Services.AddMemoryCache(); public class Book { public int Id { get; init; } public string Title { get; init; } publ 阅读全文
摘要:
使用Expression using (MyDbContext ctx = new MyDbContext()) { Expression<Func<Student, bool>> exp01 = s => s.Name.Contains("stu"); foreach (Student s in 阅读全文
摘要:
使用IsConcurrencyToken()设置并发token builder.Property(h => h.Owner).IsConcurrencyToken(); 使用SQL语句类似以下 update house set owner = @p0 where id = 1 and owner = 阅读全文