0

I have created a database with details of a car. I have to test the database using the WCF Test client. Once I input a car ID and invoke, it will not display my data from the table. Only null values. Here is my code for the service class. Why will my saved data from my table not display?

public class CarService : ICarService
{

    public Car GetCar(int id)
    {
        CarBDO carBDO = new CarBDO();
        Car car = new Car();
        TranslateCarBDOToCarDTO(carBDO, car);
        return car;
     }



    private void TranslateCarBDOToCarDTO(CarBDO carBDO, Car car)
    {
        car.CarID = carBDO.CarID;
        car.CurrentOwner = carBDO.CurrentOwner;
        car.DateFirstRegistered = carBDO.DateFirstRegistered;
        car.SornStatus = carBDO.SornStatus;
        car.Colour = carBDO.Colour;
        car.EngineSize = carBDO.EngineSize;
        car.YearofManufacture = carBDO.YearofManufacture;
        car.DateTaxed = carBDO.DateTaxed;
        car.Make = carBDO.Make;
        car.Model = carBDO.Model;   
    }

Below is the image of how the Test client looks when I invoke a car ID

EGHM
  • 2,144
  • 23
  • 37
matthewoak
  • 49
  • 9

1 Answers1

0

I'm using wcf test client in order to test my web services. I'm pretty sure its not about wcf test client. for troubleshooting i suggest to log the values and see if they are actually null or not. then post the more detail so we can help you.

Mohammad
  • 2,724
  • 6
  • 29
  • 55