public static VehicleServiceEvent getVehicleAndServiceEvents(int?id) { BasicVehicleDbContext db = new BasicVehicleDbContext(); VehicleServiceEvent vehServiceEvents = new VehicleServiceEvent(); vehServiceEvents.vehicle = getVehicle(id); var serviceEvents = db.ServiceEvents.Where(s => s.Vin == vehServiceEvents.vehicle.Vin); vehServiceEvents.serviceEvents = serviceEvents.ToList(); return(vehServiceEvents); }
public static VehicleServiceEvent getVehicleAndServiceEvents(int?id) { VehicleServiceEvent vehicleServiceEvent = BasicVehicle.getVehicleAndServiceEvents(id); return(vehicleServiceEvent); }