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