예제 #1
0
 public static string deletegroup(int cpId)
 {
     try
     {
         using (var db = new hoccattocEntities())
         {
             var cp = new group()
             {
                 id = cpId
             };
             db.Entry(cp).State = EntityState.Deleted;
             db.SaveChanges();
         }
         return(string.Empty);
     }
     catch (Exception ex)
     {
         return("Thất bại: " + ex.Message);
     }
 }