public void InsertGroup(PageGroup pageGroup)
 {
     try
     {
         db.PageGroups.Add(pageGroup);
     }
     catch (Exception)
     {
     }
 }
예제 #2
0
 public bool UpdateGroup(PageGroup pageGroup)
 {
     try
     {
         db.Entry(pageGroup).State = EntityState.Modified;
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
예제 #3
0
 public bool InsertGroup(PageGroup pageGroup)
 {
     try
     {
         db.PageGroups.Add(pageGroup);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool UpdateGroup(PageGroup pageGroup)
 {
     try
     {
         db.Entry(pageGroup).State = EntityState.Modified;    // At first find in DB by state find the primarykey and after that modified the field
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool DeleteGroup(PageGroup pageGroup)
 {
     try
     {
         db.Entry(pageGroup).State = EntityState.Deleted;
         return(true);
     }
     catch
     {
         return(false);
     }
 }