public virtual void Build <TCompatibleRequest>(CrudRequestConfig <TCompatibleRequest> config) { if (OptionsConfig != null) { config.SetOptionsFor <TEntity>(OptionsConfig); } if (ErrorHandlerFactory != null) { config.ErrorConfig.SetErrorHandlerFor(typeof(TEntity), ErrorHandlerFactory); } config.SetEntityDefault(DefaultValue); if (RequestItemKey != null) { config.SetRequestKey(RequestItemKey); } if (EntityKey != null) { config.SetEntityKey <TEntity>(EntityKey); } if (RequestItemSource != null) { config.SetEntityRequestItemSource <TEntity>(RequestItemSource); } if (Selector != null) { config.SetEntitySelector <TEntity>(Selector); } if (CreateEntity != null) { config.SetEntityCreator(CreateEntity); } if (UpdateEntity != null) { config.SetEntityUpdator(UpdateEntity); } if (CreateResult != null) { config.SetEntityResultCreator(CreateResult); } if (Sorter != null) { config.SetEntitySorter <TEntity>(Sorter); } if (_filters.Count > 0) { config.SetEntityFilters <TEntity>(_filters); } config.SetEntityHooksFor <TEntity>(EntityHooks); }