public IndexViewModel Build(string orderBy, string direction, int skip, int take)
        {
            IDataTypeRepository dataTypeRepository = this.handler.Storage.GetRepository <IDataTypeRepository>();

            return(new IndexViewModel()
            {
                Grid = new GridViewModelBuilder(this.handler).Build(
                    orderBy, direction, skip, take, dataTypeRepository.Count(),
                    new[] {
                    new GridColumnViewModelBuilder(this.handler).Build("Name", "Name"),
                    new GridColumnViewModelBuilder(this.handler).Build("Position", "Position"),
                    new GridColumnViewModelBuilder(this.handler).BuildEmpty()
                },
                    dataTypeRepository.Range(orderBy, direction, skip, take).Select(dt => new DataTypeViewModelBuilder(this.handler).Build(dt)),
                    "_DataType"
                    )
            });
        }
        public IndexViewModel Create(string orderBy, string direction, int skip, int take, string filter)
        {
            IDataTypeRepository dataTypeRepository = this.RequestHandler.Storage.GetRepository <IDataTypeRepository>();

            return(new IndexViewModel()
            {
                Grid = new GridViewModelFactory(this.RequestHandler).Create(
                    orderBy, direction, skip, take, dataTypeRepository.Count(filter),
                    new[] {
                    new GridColumnViewModelFactory(this.RequestHandler).Create("Name", "Name"),
                    new GridColumnViewModelFactory(this.RequestHandler).Create("Position", "Position"),
                    new GridColumnViewModelFactory(this.RequestHandler).CreateEmpty()
                },
                    dataTypeRepository.Range(orderBy, direction, skip, take, filter).Select(dt => new DataTypeViewModelFactory(this.RequestHandler).Create(dt)),
                    "_DataType"
                    )
            });
        }
        public IndexViewModel Create(string orderBy, string direction, int skip, int take, string filter)
        {
            IDataTypeRepository dataTypeRepository             = this.RequestHandler.Storage.GetRepository <IDataTypeRepository>();
            IStringLocalizer <IndexViewModelFactory> localizer = this.RequestHandler.GetService <IStringLocalizer <IndexViewModelFactory> >();

            return(new IndexViewModel()
            {
                Grid = new GridViewModelFactory(this.RequestHandler).Create(
                    orderBy, direction, skip, take, dataTypeRepository.Count(filter),
                    new[] {
                    new GridColumnViewModelFactory(this.RequestHandler).Create(localizer["Storage data type"], "StorageDataType"),
                    new GridColumnViewModelFactory(this.RequestHandler).Create(localizer["Name"], "Name"),
                    new GridColumnViewModelFactory(this.RequestHandler).Create(localizer["Data type parameters"]),
                    new GridColumnViewModelFactory(this.RequestHandler).Create(localizer["Position"], "Position"),
                    new GridColumnViewModelFactory(this.RequestHandler).CreateEmpty()
                },
                    dataTypeRepository.Range(orderBy, direction, skip, take, filter).ToList().Select(dt => new DataTypeViewModelFactory(this.RequestHandler).Create(dt)),
                    "_DataType"
                    )
            });
        }