public async Task <IActionResult> CreateMake([FromBody] Make make) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } if (!await _makeRepository.CreateMake(make)) { ModelState.AddModelError("", $"Ocorreu um erro ao salvar a marca {make.Description}"); return(StatusCode(500, ModelState)); } return(CreatedAtRoute("GetMake", new { makeId = make.Id }, make)); }