Question

I have a WCF service that uses a separate project for a DAL, which I have a reference to, and can access the entity objects with the DAL, through the service as such:

    [OperationContract]
    GeoLocations GetLocations();

This returns a GeoLocations object.

The issue is that I have updated the DAL as my database has changed, and I see all the new fields in the code, however when I do a 'view source' on GeoLocations I see the following file:

   GeoLocations [from metadata]

... which doesn't contain any of the new fields, and is locked in the IDE.

I have tried cleaning the project, deleting all the DLL's, etc., but I still see the old class.

How can I update this with the new properties?

Thanks.

Était-ce utile?

La solution

I faced such issue in many time and i found problem is related to this.

  1. 1.As you change in DAL. It is neccesarry that you build that project first.
  2. WCF pproject as Reference of DAL. So you need to build this too and verify that it has updated DLL.

Now go to project and update service reference. of that Service in project or application where you consume your WCF service.

Autres conseils

A couple of things:

When updating the service reference, depending on how large the service is that is being consumed, all the property definitions may not be updated right away. Also, after the service reference has been updated, I recommend building the project and then continuing. This seems to avoid the previous issue.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top