protected void SetDbContext(IConfiguration configuration) { var optionsBuilder = new DbContextOptionsBuilder <CartContext>(); optionsBuilder.UseSqlServer(configuration.GetSection("ConnectionConfiguration:ConnectionString").Value); _context = new CartContext(optionsBuilder.Options, configuration); }
public BaseDataAccess(CartContext context) { _context = context; }