コード例 #1
0
 public async Task <IActionResult> AddTourWithManagerAndShows([FromBody] TourWithManagerAndShowsForCreation tour)
 {
     if (tour == null)
     {
         return(BadRequest());
     }
     return(await AddSpecificTour(tour));
 }
コード例 #2
0
        public async Task <IActionResult> AddTourWithManagerAndShows(
            [FromBody] TourWithManagerAndShowsForCreation tour)
        {
            if (tour == null)
            {
                return(BadRequest());
            }

            // validation of the DTO happens here

            // the rest is the same as for other actions.
            return(await AddSpecificTour(tour));
        }
コード例 #3
0
 public async Task <IActionResult> AddTourWithManagerAndShows([FromBody] TourWithManagerAndShowsForCreation tour) =>
 await AddSpecificTour(tour);
コード例 #4
0
 public async Task <IActionResult> AddTourWithManagerAndShows([FromBody] TourWithManagerAndShowsForCreation tour)
 {
     return(await AddSpecificTour <TourWithManagerAndShowsForCreation>(tour));
 }