public async Task <IActionResult> AddSeason(int tvSeriesId, [FromBody] AddSeasonBindingModel seasonBindingModel) { var result = await _seasonService.AddSeason(tvSeriesId, seasonBindingModel); if (result.ErrorOccurred) { return(BadRequest(result)); } return(Ok(result)); }
public IActionResult Season([FromBody] MvSeason season) { try { int seasonId = seasonService.AddSeason(season); return(Ok(seasonId)); } catch (Exception ex) { return(BadRequest(ex.Message)); } }