public BootstrapControllerBase(IBootstrapRepository <TEntity> repository) { this.Repository = repository; this.Config = new BootstrapControllerConfig <TEntity, TViewModel> { CreateViewName = "Create", ReadViewName = "Read", UpdateViewName = "Update", ListViewName = "List", EntityLabelSelector = e => e.Id.ToString(), ViewModelLabelSelector = vm => vm.Id.ToString(), Sort = Sort.ByDescending(e => e.Created) }; this.MappingCreator = new MappingCreator <TEntity>(this.Config.RelationsConfig); this.MappingCreator.InitializeMapping <TViewModel>(DependencyResolver.Current); }
public EntitiesToChoicesConverter(MappingCreator <TEntity> mappingCreator) { this.mappingCreator = mappingCreator; }