public async Task <EducatorsStaffTypesDTO> CreateKVType(EducatorsStaffTypesDTO kvTypeDTO) { var newKVType = _mapper.Map <EducatorsStaffTypesDTO, EducatorsStaffTypes>(kvTypeDTO); await _repositoryWrapper.KVTypes.CreateAsync(newKVType); await _repositoryWrapper.SaveAsync(); return(_mapper.Map <EducatorsStaffTypes, EducatorsStaffTypesDTO>(newKVType)); }
public async Task <IEnumerable <EducatorsStaffDTO> > GetKadrasWithSuchType(EducatorsStaffTypesDTO kvTypeDTO) { var KVs = _mapper.Map <IEnumerable <EducatorsStaff>, IEnumerable <EducatorsStaffDTO> >(await _repositoryWrapper.KVs.GetAllAsync(c => c.KadraVykhovnykivTypeId == kvTypeDTO.ID)); return(KVs); }