static void Main(string[] args) { using (AssignmentDBContext db = new AssignmentDBContext()) { Items i = new Items() { ItemName = "honor", ItemPrice = 9999 }; db.Add(i); db.SaveChanges(); } }
public Repository(AssignmentDBContext db) { this.db = db; this.dbSet = db.Set <TEntity>(); }
public ProductsController(AssignmentDBContext context) { _context = context; }
public UnitOfWork() { this._db = new AssignmentDBContext(); }
public CustomersController(AssignmentDBContext context) { _context = context; }
public StoresController(AssignmentDBContext context) { _context = context; }
public UsersController(AssignmentDBContext context) { _context = context; }