public static void deleteAllGroups() { using (HikeChatsDb context = new HikeChatsDb(App.MsgsDBConnectionstring)) { context.groupInfo.DeleteAllOnSubmit <GroupInfo>(context.GetTable <GroupInfo>()); MessagesTableUtils.SubmitWithConflictResolve(context); } }
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 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); }