示例#1
0
        public bool Update(MonThi entity)
        {
            var mt = tn.MonThis.Find(entity.MaMon);

            mt.TenMon = entity.TenMon;
            tn.SaveChanges();
            return(true);
        }
示例#2
0
 public int Insert(MonThi entity)
 {
     tn.MonThis.Add(entity);
     tn.SaveChanges();
     return(entity.MaMon);
 }