/// <summary> /// 配置需要生成页面的Crud服务 /// </summary> /// <typeparam name="TEntityDto"></typeparam> /// <typeparam name="TPrimaryKey"></typeparam> /// <typeparam name="TCreateInput"></typeparam> /// <typeparam name="TUpdateInput"></typeparam> /// <typeparam name="TGetListInput"></typeparam> /// <param name="service"></param> public void SetCrudService <TEntityDto, TPrimaryKey, TCreateInput, TUpdateInput, TGetListInput, TListEntityDto>( ICrudAppService <TEntityDto, TPrimaryKey, TCreateInput, TUpdateInput, TGetListInput, TListEntityDto> service) where TEntityDto : IEntityDto <TPrimaryKey> where TCreateInput : IEntityDto <TPrimaryKey> where TUpdateInput : IEntityDto <TPrimaryKey> where TListEntityDto : IEntityDto <TPrimaryKey> { DtoTypes.Clear(); DtoTypes["Entity"] = typeof(TEntityDto); DtoTypes["EntityDto"] = typeof(TEntityDto); DtoTypes["CreateDto"] = typeof(TCreateInput); DtoTypes["UpdateDto"] = typeof(TUpdateInput); DtoTypes["PrimaryKey"] = typeof(TPrimaryKey); DtoTypes["GetListDto"] = typeof(TGetListInput); var entityName = typeof(TEntityDto).Name; if (entityName.EndsWith("Dto")) { entityName = entityName.Substring(0, entityName.Length - 3); } ValueSet("EntityName", entityName); ValueSet("EntityDtoName", entityName); var createDtoName = typeof(TCreateInput).Name; if (createDtoName.EndsWith("Dto")) { createDtoName = createDtoName.Substring(0, createDtoName.Length - 3); } ValueSet("CreateDtoName", createDtoName); var updateDtoName = typeof(TCreateInput).Name; if (updateDtoName.EndsWith("Dto")) { updateDtoName = updateDtoName.Substring(0, updateDtoName.Length - 3); } ValueSet("UpdateDtoName", updateDtoName); var getAllDtoName = typeof(TCreateInput).Name; if (getAllDtoName.EndsWith("Dto")) { getAllDtoName = getAllDtoName.Substring(0, getAllDtoName.Length - 3); } ValueSet("GetListDtoName", getAllDtoName); }
public CrudApiControllerBase(ICrudAppService <TKey, TEntityDto, TEntityAddDto, TEntityUpdateDto, TEntityQueryIntputDto, TEntityPageQueryInputDto> appService) { this.appService = appService; }
public TipoTarefaService(IMapper mapper, ICrudAppService <TipoTarefaViewModel> tipoTarefaAppService) { _mapper = mapper; _tipoTarefaAppService = tipoTarefaAppService; }
public ProjetoService(IMapper mapper, ICrudAppService <ProjetoViewModel> projetoAppService) { _mapper = mapper; _projetoAppService = projetoAppService; }
public ProjetoController(ICrudAppService <ProjetoViewModel> projetoAppService) { _projetoAppService = projetoAppService; }
public ImpedimentoController(ICrudAppService <ImpedimentoViewModel> impedimentoAppService) { _impedimentoAppService = impedimentoAppService; }
public SistemaController(ICrudAppService <SistemaViewModel> sistemaAppService) { _sistemaAppService = sistemaAppService; }
public ImpedimentoService(IMapper mapper, ICrudAppService <ImpedimentoViewModel> impedimentoAppService) { _mapper = mapper; _impedimentoAppService = impedimentoAppService; }
public WorkflowController(ICrudAppService <WorkflowViewModel> workflowAppService) { _workflowAppService = workflowAppService; }
protected CrudBaseController(ICrudAppService <TEntityDto, TCreateInput, TUpdateInput> service) { Service = service; }
public SistemaService(IMapper mapper, ICrudAppService <SistemaViewModel> sistemaAppService) { _mapper = mapper; _sistemaAppService = sistemaAppService; }
public WorkflowService(IMapper mapper, ICrudAppService <WorkflowViewModel> workflowAppService) { _mapper = mapper; _workflowAppService = workflowAppService; }
/// <summary> /// 初始化一个<see cref="CrudControllerBase{TDto, TQuery}"/>类型的实例 /// </summary> /// <param name="service">Crud服务</param> protected CrudControllerBase(ICrudAppService <TDto, TQuery> service) : base(service) { }
public TipoTarefaController(ICrudAppService <TipoTarefaViewModel> tipoTarefaAppService) { _tipoTarefaAppService = tipoTarefaAppService; }