Пример #1
0
        public bool SaveMovieData(MovieUpdateData movieUpdateData)
        {
            var metadata = new List <Metadata>();

            metadata.Add(
                new Metadata
            {
                MovieId     = movieUpdateData.MovieId,
                Title       = movieUpdateData.Title,
                Language    = movieUpdateData.Language,
                Duration    = DateTime.TryParse(movieUpdateData.Duration, out var duration) ? duration.TimeOfDay : new TimeSpan(0),
                ReleaseYear = movieUpdateData.ReleaseYear
            });
Пример #2
0
        public IActionResult Post([FromBody] MovieUpdateData movieUpdateData)
        {
            var moviesPostResponseData = _movieDataBL.SaveMovieData(movieUpdateData);

            return(Ok(moviesPostResponseData));
        }