Exemplo n.º 1
0
        protected void SetDbContext(IConfiguration configuration)
        {
            var optionsBuilder = new DbContextOptionsBuilder <CartContext>();

            optionsBuilder.UseSqlServer(configuration.GetSection("ConnectionConfiguration:ConnectionString").Value);
            _context = new CartContext(optionsBuilder.Options, configuration);
        }
Exemplo n.º 2
0
 public BaseDataAccess(CartContext context)
 {
     _context = context;
 }