I'm developing a client/server data driven application using caliburn.micro for frontend and Asp.net WebApi 2 for backend.
public class Person
{
public int Id {get;set;}
public string FirstName{get;set;}
...
}
The application contains a class called "Person". A "Person" object is serialized (JSON) and moved back and forth from client to server using simple REST protocal. The solution works fine without any problem.
Problem:
I have set a parent class "PropertyChangedBase" for "Person" in order to implement NotifyOfPropertyChanged().
public class Person : PropertyChangedBase
{
public int Id {get;set;}
private string _firstName;
public string FirstName
{
get { return _firstName; }
set
{
_firstName = value;
NotifyOfPropertyChange(() => FirstName);
}
}
...
}
But this time the properties of class "Person" has NULL values at receiving end.
I guess there is a problem with serialization / deserialization. This is only happens when implementing PropertyChangedBase.
Can anyone help me to overcome this issue?