예제 #1
0
        public IActionResult Add(AddVenueViewModel model)
        {
            var venue = new Venue
            {
                Description = model.Description
            };

            _venueService.AddVenue(venue);

            return(View("Index", new VenueListViewModel {
                VenueList = _venueService.GetVenues().ToList()
            }));
        }
        public async Task <VenueViewModel> AddVenue([FromBody] VenueModel venue)
        {
            var result = await _venueService.AddVenue(venue);

            return(result);
        }