Ejemplo n.º 1
0
        public AllPartsModel GetAllParts()
        {
            var model = new AllPartsModel()
            {
                Parts = this.db.Parts.Select(p => new PartListingModel()
                {
                    Id    = p.Id,
                    Name  = p.Name,
                    Price = p.Price
                })
            };

            return(model);
        }
Ejemplo n.º 2
0
        public IActionResult All()
        {
            AllPartsModel model = this.partService.GetAllParts();

            return(this.View(model));
        }