Created
September 24, 2013 21:03
-
-
Save molsches/6691194 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
foreach (var model in models) | |
{ | |
if (model.first_name == null) | |
{ | |
return Request.CreateResponse(HttpStatusCode.BadRequest, | |
new ErrorResponse[] | |
{new ErrorResponse(ErrorCodes.FirstNameRequired)}); | |
//OR record this element in the array and then create an array without these elements and fail silently | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment