public void InsertGroup(PageGroup pageGroup)
 {
     try
     {
         db.PageGroups.Add(pageGroup);
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 2
0
 public bool UpdateGroup(PageGroup pageGroup)
 {
     try
     {
         db.Entry(pageGroup).State = EntityState.Modified;
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Ejemplo n.º 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);
     }
 }