示例#1
0
 public void Create(Bill bill)
 {
     dbContext.Bills.Add(bill);
     dbContext.SaveChanges();
 }
示例#2
0
 public bool Update(Bill bill)
 {
     if (ModelState.IsValid)
     {
         //var emp = dbContext.Employees.Where(e => e.ID == Id).SingleOrDefault();
         dbContext.Entry(bill).State = EntityState.Modified;
         dbContext.SaveChanges();
         return true;
     }
     return false;
 }