public static GroupInfo getGroupInfoForId(string groupId)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         GroupInfo cObj = DbCompiledQueries.GetGroupInfoForID(context, groupId).FirstOrDefault();
         return(cObj);
     }
 }
 public static void deleteGroupWithId(string groupId)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         context.groupInfo.DeleteAllOnSubmit <GroupInfo>(DbCompiledQueries.GetGroupInfoForID(context, groupId));
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
 }
 public static bool IsGroupAlive(string groupId)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         GroupInfo cObj = DbCompiledQueries.GetGroupInfoForID(context, groupId).FirstOrDefault();
         if (cObj == null)
         {
             return(false);
         }
         return(cObj.GroupAlive);
     }
 }
 public static void SetGroupAlive(string groupId)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         GroupInfo cObj = DbCompiledQueries.GetGroupInfoForID(context, groupId).FirstOrDefault();
         if (cObj == null)
         {
             return;
         }
         cObj.GroupAlive = true;
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
 }
 public static bool updateGroupName(string groupId, string groupName)
 {
     using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring))
     {
         GroupInfo cObj = DbCompiledQueries.GetGroupInfoForID(context, groupId).FirstOrDefault();
         if (cObj == null)
         {
             return(false);
         }
         cObj.GroupName = groupName;
         MessagesTableUtils.SubmitWithConflictResolve(context);
     }
     return(true);
 }