예제 #1
0
        public async Task <IActionResult> VenueSave(VenueVM model)
        {
            var request = new VenueUpsertRequest()
            {
                Name          = model.Name,
                Address       = model.Address,
                VenueCategory = model.VenueCategory,
                CityID        = model.CityID
            };

            if (model.ID == 0)
            {
                await _eventiApi.CreateVenueAsync(request);
            }
            else
            {
                await _eventiApi.UpdateVenueAsync(model.ID, request);
            }

            return(Redirect("Index"));
        }