示例#1
0
 public GenericController(IGenericService <TModel, TSaveDto, TReadDto> genericService, IMapper mapper, IValidator validator, IPropertyProviderFactory propertyProviderFactory)
 {
     _genericService      = genericService;
     _mapper              = mapper;
     _validator           = validator;
     _propertyProvider    = propertyProviderFactory.Create(typeof(TPropertyProvider));
     _propertiesToInclude = _propertyProvider.GetModelPropertiesToInclude().ToArray();
     _propertyInfoList    = _propertyProvider.GetReadDtoPropertiesToDisplay();
 }