摘要:
一、封装全局异常过滤器实现IExceptionFilter接口 public class GlobalExceptionFilter : IExceptionFilter { public void OnException(ExceptionContext context) { if (contex 阅读全文
摘要:
一、自定义配置类实现IEntityTypeConfiguration<T>接口 public class SecurityConfiguration:IEntityTypeConfiguration<Security> { public void Configure(EntityTypeBuilde 阅读全文
摘要:
一、普通带参数存储过程 --创建存储过程 if (exists (select * from sys.objects where name = 'proc_getTotalRecords')) drop proc proc_getTotalRecords go create proc proc_ge 阅读全文
摘要:
一、方法封装 public static class DbContextExtension { public static List<T> GetList<T>(this DbContext db, string sql, CommandType type=CommandType.Text, par 阅读全文