Exemplo n.º 1
0
        public async Task <ActionResult> Create(Trip trip)
        {
            if (ModelState.IsValid)
            {
                await _tripService.AddNewTripAsync(trip);

                return(RedirectToAction("Index"));
            }
            return(View(trip));
        }
Exemplo n.º 2
0
 public async Task HandleAsync(AddNewTrip command)
 {
     await _trip.AddNewTripAsync(command.UserID, command.Name, command.Location, command.Link);
 }