public async Task <IActionResult> Post(CustomerPost customerPost) { if (await _customers.ExistsEmail(customerPost.Email)) { throw new Exception("E-mail ja cadastrado"); } var customer = customerPost.CreateDomain(); await _customers.Insert(customer); return(Ok(new Response <long>(customer.Id))); }