public static async Task <bool> HasZeroActivityApplicationSubmittedAsync(Guid userId, int period)
 {
     using (var cmd = new SqlCommand(NumOfZeroActivityApplications))
     {
         cmd.CommandType = CommandType.Text;
         cmd.Parameters.AddWithValue("@UserID", userId);
         cmd.Parameters.AddWithValue("@Period", period);
         return(Convert.ToInt32(await DbHelper.ExecuteScalarAsync(!(await RedisHelper.GetZeroActivityApplyCacheOnPeriod(period)) || !(await RedisHelper.GetZeroActivityApplyCacheOnUserId(userId)), cmd)) > 0);
     }
 }
        public static async Task <IEnumerable <MyZeroActivityApplications> > SelectMyApplicationsAsync(Guid userId, int applicationStatus)
        {
            using (var cmd = new SqlCommand(SelectMyApplications))
            {
                cmd.CommandType = CommandType.Text;
                cmd.Parameters.AddWithValue("@UserID", userId);
                cmd.Parameters.AddWithValue("@ApplicationStatus", applicationStatus);

                return(await DbHelper.ExecuteSelectAsync <MyZeroActivityApplications>(!(await RedisHelper.GetZeroActivityApplyCacheOnUserId(userId)), cmd));
            }
        }