Skip to content

Instantly share code, notes, and snippets.

@molsches
Created September 24, 2013 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save molsches/6691194 to your computer and use it in GitHub Desktop.
Save molsches/6691194 to your computer and use it in GitHub Desktop.
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