コード例 #1
0
        public async Task <FilmModel> AddOrUpdateFilm(FilmModel film)
        {
            int id = await _filmRepository.AddOrUpdateFilm(Mapper.Map <DalFilmModel>(film));

            return(new FilmModel(
                       (id != 0) ? id : film.Id,
                       film.Name,
                       film.Description,
                       film.StartRentDate,
                       film.EndRentDate
                       ));
        }