Beispiel #1
0
        public IEnumerable <TechnologyDto> GetTechnologiesByName(string name)
        {
            var list = new List <TechnologyDto>();

            foreach (var technology in _repository.GetTechnologiesByName(name))
            {
                list.Add(DTOMapper.GeTechnologyDto(technology));
            }
            return(list);
        }
Beispiel #2
0
        public IEnumerable <TechnologyDto> GetAllTechnologies()
        {
            var list = new List <TechnologyDto>();

            foreach (var technology in _repository.Technologies)
            {
                list.Add(DTOMapper.GeTechnologyDto(technology));
            }
            return(list);
        }
Beispiel #3
0
        public TechnologyDto GetTechnology(int id)
        {
            var tech = _repository.Get(id);

            if (tech != null)
            {
                return(DTOMapper.GeTechnologyDto(tech));
            }

            return(null);
        }