コード例 #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);
        }
コード例 #2
0
 public BaseDataAccess(CartContext context)
 {
     _context = context;
 }