public UserException(List <string> userErrors, int code = 400) : this(code) { if (userErrors != null && userErrors.Count != 0) { UserErrors.AddRange(userErrors); } }
public UserException(string[] userErrors, int code = 400) : this(code) { if (userErrors != null && userErrors.Length != 0) { UserErrors.AddRange(userErrors); } }
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)); }
public UserException(IdentityResult result, int code = 400) : this(code) { UserErrors.AddRange(result.Errors.Select(x => x.Description)); }