public ActionResult Add([FromBody] MovieGenreDto dto) { var entity = MovieGenreFactory.ParsingDto(dto); _repository.Save(entity); return(new JsonResult(ResponseDmo.Success(MovieGenreFactory.ShowMovieGenre(entity), HttpStatusCode.Created))); }
public ActionResult Detail(int id) { var data = _repository.FindById(id); if (data != null) { return(new JsonResult(ResponseDmo.Success(MovieGenreFactory.ShowMovieGenre(data)))); } return(NotFound()); }
public ActionResult <MovieGenreDmo> GetMovieGenre() { var data = _repository.GetAll(); return(new JsonResult(ResponseDmo.Success(data))); }