Exemplo n.º 1
0
        public async Task <IActionResult> SponsorSave(SponsorVM model)
        {
            var request = new SponsorUpsertRequest()
            {
                Name        = model.Name,
                PhoneNumber = model.PhoneNumber,
                Email       = model.Email
            };


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

            return(Redirect("/Administrator/Home/Index"));
        }