public List <InventoryReport> GetNewInventoryList() { List <InventoryReport> list = new List <InventoryReport>(); using (_ctx = new GuildCarsEntities()) { try { var newList = _ctx.NewInventoryReport(); foreach (var car in newList) { InventoryReport report = new InventoryReport(); report.Year = car.Year; report.CarMake = car.MakeName; report.CarModel = car.ModelName; report.Count = car.TotalVehicles; report.StockValue = car.TotalValue; list.Add(report); } } catch (Exception ex) { throw ex; } return(list); } }