예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="UnitOfWork"/> class.
 /// </summary>
 /// <param name="context">The context<see cref="ElectricityCorrespondenceContext"/></param>
 public UnitOfWork(ChemicleanContext context, IHttpContextAccessor httpContext)
 {
     _context    = context;
     HttpContext = httpContext;
 }
예제 #2
0
 public ProductRepository(ChemicleanContext context) : base(context)
     => entity = context.Set <Product>() ?? throw new ArgumentException(nameof(entity));