/// <summary>
 ///  check that wheather that user is existed or not. if found returns alread existed message, else save the user details.
 /// </summary>
 /// <param name="userRegister">user details.</param>
 /// <returns>returns the status message.</returns>
 public string UserRegistration(Users userRegister)
 {
     if (userRegister != null)
     {
         var user = this.queries.UserExist(userRegister.EmailId);
         if (user == null)
         {
             userRegister.Password = this.EncodePassword(userRegister.Password);
             var result = queries.UserRegister(userRegister);
             if (result == true)
             {
                 return(Messages.UserRegister);
             }
         }
     }
     return(Messages.UserExists);
 }