public async Task <IActionResult> Post([FromBody] CompetitionForCreation competition) { if (!ModelState.IsValid || competition == null) { return(BadRequest()); } var competitionToAdd = mapper.Map <Competition>(competition); await competitionServis.AddCompetitionAsync(competitionToAdd); if (!await competitionServis.SaveChanges()) { return(StatusCode(500, "Fault while saving...")); } var competitionForDisplay = mapper.Map <ContestantForDisplay>(competitionToAdd); return(Ok(competitionForDisplay)); }