예제 #1
0
 public UserException(List <string> userErrors, int code = 400) : this(code)
 {
     if (userErrors != null && userErrors.Count != 0)
     {
         UserErrors.AddRange(userErrors);
     }
 }
예제 #2
0
 public UserException(string[] userErrors, int code = 400) : this(code)
 {
     if (userErrors != null && userErrors.Length != 0)
     {
         UserErrors.AddRange(userErrors);
     }
 }
예제 #3
0
 public UserException(ModelStateDictionary modelState, int code = 400) : this(code)
 {
     UserErrors.AddRange(modelState
                         .Select(x => x.Value.Errors)
                         .Where(y => y.Count > 0)
                         .SelectMany(z => z)
                         .Select(e => e.ErrorMessage));
 }
예제 #4
0
 public UserException(IdentityResult result, int code = 400) : this(code)
 {
     UserErrors.AddRange(result.Errors.Select(x => x.Description));
 }