Пример #1
0
 public HV_Groups Delete(HV_Groups group)
 {
     using (var u = GetDb())
     {
         u.HV_Groups.Attach(group);
         u.HV_Groups.Remove(group);
         u.SaveChanges();
         return group;
     }
 }
Пример #2
0
 public HV_Groups Create(int maxNo, string bio)
 {
     using (var u = GetDb())
     {
         var group = new HV_Groups()
         {
             Grp_MaxNo = maxNo,
             Grp_Bio = bio
             
         };
         u.HV_Groups.Add(group);
         u.SaveChanges();
         return group;
     }
 }