public override async Task <bool> TryUpdateModelAsync <TModel>(TModel model) { if (await base.TryUpdateModelAsync(model)) { await BindAttributeRunner.BindOn(this, (IViewModel)model); return(true); } return(false); }
public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { await BindAttributeRunner.Run(context); if (!await AuthorizeRequestParams(context)) { context.Result = Unauthorized(); } else { await base.OnActionExecutionAsync(context, next); } }
public override async Task <bool> TryUpdateModelAsync <TModel>(TModel model) { var result = await base.TryUpdateModelAsync(model); try { await BindAttributeRunner.Bind(model as IViewModel, this); } catch { return(false); } return(result); }
/// <summary> /// Creates a new instance of the specified view model type and binds it using the standard request data. /// </summary> public override async Task OnActionExecutionAsync(ActionExecutingContext context, ActionExecutionDelegate next) { await BindAttributeRunner.Run(context, next); await base.OnActionExecutionAsync(context, next); }