Beispiel #1
0
        public async Task <ActionResult> Edit([Bind(Include = nameof(GeoEpithetRequestModel.Id) + "," + nameof(GeoEpithetRequestModel.Name))] GeoEpithetRequestModel 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));
        }
Beispiel #2
0
 public async Task UpdateAsync(GeoEpithetRequestModel model)
 {
     await this.service.UpdateAsync(model);
 }