public VehicleBase VehicleGetById(int id) { // Attempt to fetch the object var o = ds.Vehicles.Find(id); // Return the result, or null if not found return (o == null) ? null : Mapper.Map<VehicleBase>(o); }