public string Edit(dmTinhThanh model) { if (ModelState.IsValid) { db.Entry(model).State = EntityState.Modified; db.SaveChanges(); return("OK"); } return(ModelState.getErrorMessage()); }
public string Create(dmTinhThanh model) { if (ModelState.IsValid) { db.dmTinhThanh.Add(model); db.SaveChanges(); return("OK"); } return(ModelState.getErrorMessage()); }