Beispiel #1
0
 public static bool isUserBlocked(string msisdn)
 {
     using (HikeUsersDb context = new HikeUsersDb(App.UsersDBConnectionstring))
     {
         List <Blocked> res = DbCompiledQueries.GetBlockedUserForMsisdn(context, msisdn).ToList <Blocked>();
         if (res != null && res.Count > 0)
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #2
0
 public static void unblock(string msisdn)
 {
     using (HikeUsersDb context = new HikeUsersDb(App.UsersDBConnectionstring))
     {
         List <Blocked> res = DbCompiledQueries.GetBlockedUserForMsisdn(context, msisdn).ToList <Blocked>();
         if (res == null || res.Count == 0)
         {
             return;
         }
         context.blockedUsersTable.DeleteAllOnSubmit(res);
         SubmitWithConflictResolve(context);
     }
 }