Пример #1
0
        public async Task <ListDTO> GetAllById(int id)
        {
            var data = await _repository.GetAllById(id);

            return(new ListDTO()

            {
                Id = data.Id,
                VendorName = data.VendorName,
                Title = data.Title,
                Modifiedate = data.Modifiedate,
                Createdate = data.Createdate,
                PhoneNumber = data.PhoneNumber,
                Address = data.Address,
                NameTag = data.Tag.Select(t => t.NameTag).ToList()
            });
        }
Пример #2
0
        public ListDTO GetAllById(int id)
        {
            var data = _repository.GetAllById(id);

            var result = new ListDTO()
            {
                Id          = data.Id,
                VendorName  = data.VendorName,
                Title       = data.Title,
                Modifiedate = data.Modifiedate,
                Createdate  = data.Createdate,
                PhoneNumber = data.PhoneNumber,
                Address     = data.Address,
                NameTag     = data.Tag.Select(t => t.NameTag).ToList()
            };

            return(result);
        }