Exemplo n.º 1
0
        public AdminBuilder RegisterTreeAndForm <TModel, TAdminService>(Action <ModelBuilder <TModel> > modelBuilderAction = null)
            where TModel : class
            where TAdminService : IAdminTreeService <TModel>
        {
            var adminConfig = new AdminConfig <TModel>
            {
                AdminConfigType  = AdminConfigType.TreeAndForm,
                AdminServiceType = typeof(TAdminService)
            };

            BuildAdmin(adminConfig, modelBuilderAction);
            return(this);
        }
Exemplo n.º 2
0
        public AdminBuilder RegisterGrid <TModel, TAdminGridService>(Action <GridBuilder <TModel> > gridBuilderAction = null)
            where TModel : class
            where TAdminGridService : IAdminGridService <TModel>
        {
            var adminConfig = new AdminConfig <TModel>()
            {
                AdminConfigType  = AdminConfigType.GridOnly,
                AdminServiceType = typeof(TAdminGridService)
            };

            BuildAdmin(adminConfig, gridBuilderAction);
            return(this);
        }