public async Task <IActionResult> Create([Bind("Name")] Format format) { if (!ModelState.IsValid) { return(BadRequest()); } Format newFormat = await formatService.CreateAsync(format); if (newFormat == null) { return(BadRequest()); } return(CreatedAtRoute("FindFormatById", new { id = newFormat.Id }, newFormat)); }