public Task <IActionResult> HandleDeleteConfirmedAsync( Action <TEntity> setPageEntity, Func <TUserContext, bool> authorize, string formEntityPrefix, Func <TEntity> constructor, Dictionary <string, Func <TEntity, Action <StringValues> > > hiddenFormFields ) => HandlePageSaveAsync(setPageEntity, pageRoutineFeature, (repository, closure) => steps => steps( () => authorize?.Invoke(closure.UserContext) ?? true, request => MvcHandler.Bind(request, formEntityPrefix, constructor, // TODO: convert to Empty instance new Dictionary <string, Func <TEntity, Func <StringValues, IVerboseResult <List <string> > > > >(), hiddenFormFields), (entity, batch) => batch.Remove(entity) ) );
public Task <IActionResult> HandleCreateConfirmedAsync( Action <TEntity> setPageEntity, Func <TUserContext, bool> authorize, string formEntityPrefix, Func <TEntity> constructor, Dictionary <string, Func <TEntity, Func <StringValues, IVerboseResult <List <string> > > > > formFields, Dictionary <string, Func <TEntity, Action <StringValues> > > hiddenFormFields, Func <Action <string, object>, HttpRequest, IRepository <TEntity>, TEntity, IComplexBinderResult <ValueTuple <Action <IBatch <TEntity> >, Action> > > parseRelated ) => HandlePageSaveAsync(setPageEntity, pageRoutineFeature, (repository, closure) => steps => steps( () => authorize?.Invoke(closure.UserContext) ?? true, request => MvcHandler.Bind(request, formEntityPrefix, constructor, formFields, hiddenFormFields), (request, entity, addViewData) => parseRelated(addViewData, request, repository, entity), (entity, batch) => batch.Add(entity) ) );