I am writing a web api which accepts list of customers in from file upload. Each row in file represents single customers. There can be 'n' customers in a single file.
For each row, validation check is required. The error messages needs to be displayed in respective row.
POST /api/customers List if this is the API, how to perform validations?
Code is something like this,
public async Task<IHttpActionResult> UploadCustomers(List<Customer> customers)
{
if (!ModelState.IsValid)
return BadRequest();
//Some action
}