Пример #1
0
 public string Edit(dmTinhThanh model)
 {
     if (ModelState.IsValid)
     {
         db.Entry(model).State = EntityState.Modified;
         db.SaveChanges();
         return("OK");
     }
     return(ModelState.getErrorMessage());
 }
Пример #2
0
 public string Create(dmTinhThanh model)
 {
     if (ModelState.IsValid)
     {
         db.dmTinhThanh.Add(model);
         db.SaveChanges();
         return("OK");
     }
     return(ModelState.getErrorMessage());
 }