I'm using this code generator to create business objects, with bidirectional serialization attributes, that can be sent from a server to a client using WCF. This used to work, but I've switched computers, and now I seem to only have unidirectional serialization, even though the source code has not changed.
This is a property that I would expect to still be serialized:
partial void OnApplicationIDChanging(int value);
partial void OnApplicationIDChanged();
private int _ApplicationID;
[Column(Storage=@"_ApplicationID", DbType=@"Int NOT NULL", CanBeNull=false)]
[DataMember(Order=2)]
public int ApplicationID
{
get { return _ApplicationID; }
set {
if (_ApplicationID != value) {
if (_Application.HasLoadedOrAssignedValue) {
throw new ForeignKeyReferenceAlreadyHasValueException();
}
OnApplicationIDChanging(value);
SendPropertyChanging();
_ApplicationID = value;
SendPropertyChanged("ApplicationID");
OnApplicationIDChanged();
}
}
}
private EntityRef<Application> _Application;
[Association(Name=@"Application_ApplicationExecution", Storage=@"_Application", ThisKey=@"ApplicationID", OtherKey=@"ApplicationID", IsForeignKey=true)]
public Application Application
{
get {
return _Application.Entity;
}
set {
Application previousValue = _Application.Entity;
if ((previousValue != value) || (!_Application.HasLoadedOrAssignedValue)) {
SendPropertyChanging();
if (previousValue != null) {
_Application.Entity = null;
previousValue.ApplicationExecutions.Remove(this);
}
_Application.Entity = value;
if (value != null) {
value.ApplicationExecutions.Add(this);
_ApplicationID = value.ApplicationID;
}
else {
_ApplicationID = default(int);
}
SendPropertyChanged("Application");
}
}
}
That property is on a class called ApplicationExecution. When I pull that object down, its Application property is populated on the server side, but it is null when I try to access it on the client side, after it is retrieved via a WCF service call.
I'm pretty sure all of the correct attributes are still there. Am I missing anything? If not, what might have caused this to stop working?