public async Task <ActionResult> Edit([Bind(Include = nameof(GeoNameRequestModel.Id) + "," + nameof(GeoNameRequestModel.Name))] GeoNameRequestModel model)
        {
            try
            {
                if (this.ModelState.IsValid)
                {
                    await this.service.UpdateAsync(model);
                }

                string returnUrl = this.Request[ContextKeys.ReturnUrl];
                if (!string.IsNullOrWhiteSpace(returnUrl))
                {
                    return(this.Redirect(returnUrl));
                }
            }
            catch (Exception ex)
            {
                this.logger?.Log(ex, ControllerName);
            }

            return(this.RedirectToAction(IndexActionName));
        }
Пример #2
0
 public async Task UpdateAsync(GeoNameRequestModel model)
 {
     await this.service.UpdateAsync(model);
 }