public async Task SeedAsync(OCContext context //IHostingEnvironment env, //ILogger<OCContextSeed> logger ) { var policy = CreatePolicy( //(logger, nameof(OCContextSeed) ); await policy.Execute(async() => { using (context) { context.Database.Migrate(); await context.SaveChangesAsync(); } }); }
public HP_OC_DET_Repository(OCContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); }
public TransactionBehaviour(OCContext dbContext, ILogger <TransactionBehaviour <TRequest, TResponse> > logger) { _dbContext = dbContext ?? throw new ArgumentException(nameof(OCContext)); _logger = logger ?? throw new ArgumentException(nameof(ILogger)); }