public bool Update(MonThi entity) { var mt = tn.MonThis.Find(entity.MaMon); mt.TenMon = entity.TenMon; tn.SaveChanges(); return(true); }
public int Insert(MonThi entity) { tn.MonThis.Add(entity); tn.SaveChanges(); return(entity.MaMon); }