public static UpdateMovieRequest AsRequest(this UpdateMovieWebRequest webRequest) { var result = new UpdateMovieRequest { Id = webRequest.Id, Title = webRequest.Title, Description = webRequest.Description, IsDeleted = webRequest.IsDeleted, RentalDate = webRequest.Rentaldate, IsRented = webRequest.IsRented }; return(result); }
public async Task <IActionResult> UpdateMovieAsync([FromBody] UpdateMovieWebRequest webRequest) { var result = await this.movieService.UpdateMovieAsync(webRequest.AsRequest()); return(this.CreateResponse(result.AsWebResponse())); }