Ejemplo n.º 1
0
        public IEnumerable <ItemDto> GetItems()
        {
            var allItems = _store.GetItems();

            return(allItems.Select(x => new ItemDto()
            {
                Id = x.Id,
                Name = x.Name,
                Author = x.Author,
                Price = x.Price,
                AvailableQuantity = x.AvailableQuantity
            }));
        }