I have a structure with objects and a data access code. These objects are displayed in the database using NHibernate.
For example, my framework has a class Customer and Order:
public class Customer
{
private Guid _id;
private string _name;
private IList<Order> _orders;
public properties...
}
public class Order
{
private Guid _id;
private string _orderNumber;
public properties...
}
I also have a WCF service with the PersistCustomer method. For example:
[ServiceContract]
public interface ICustomerService
{
[OperationContract]
void PersistCustomer(Customer customer);
}
This WCF has a link to my frame library.
I created a client application for the WCF service (simple console application) and it works!
The main thing I could not understand: why does it work without decorating my classes within the DataContract and their properties as DataMembers? And should I decorate them?
thanks
source
share