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); }
public IActionResult All() { AllPartsModel model = this.partService.GetAllParts(); return(this.View(model)); }