public bool Update(CatagoryBill emp) { if (ModelState.IsValid) { //var emp = dbContext.Employees.Where(e => e.ID == Id).SingleOrDefault(); dbContext.Entry(emp).State = EntityState.Modified; dbContext.SaveChanges(); return true; } return false; }
public void Create(CatagoryBill emp) { dbContext.CatagoryBills.Add(emp); dbContext.SaveChanges(); }