public async Task <IActionResult> CreateCustomerProfile([FromBody] CustomerProfile customer) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } await customerProfileService.InsertAsync(customer); await customerProfileService.SaveChangesAsync(); return(Ok(new { id = customer.Id, newAffiliationId = customer.NewAffiliationId })); }