Hi Lonely7345,
Thanks for taking the time to reply, I am currenlty using data contracts here is and example of one of my entities this is used by nhibernate and WCF:
Code:
[DataContract]
public class StorageCharge : BaseEntity<StorageCharge>, IEquatable<StorageCharge>
{
[DataMember]
private decimal _Rate;
[DataMember]
private string _Description;
[DataMember]
private string _Code;
public StorageCharge(){}
public virtual decimal Rate
{
get { return _Rate; }
set { _Rate = value; }
}
public virtual string Description
{
get { return _Description; }
set { _Description = value; }
}
public virtual string Code
{
get { return _Code; }
set { _Code = value; }
}
#region IEquatable members
public bool Equals(StorageCharge other)
{
if (other == this)
{
return true;
}
return (other != null) && (this._Id == other.Id);
}
#endregion
}
these entities wrok fine until they get to the client side, where if you go anywhere near the a proxyed property an exception is thrown relating to the missing session.
Any suggestions on how to pass the entities and thier relation back across wcf and if the relation hasnt been fetched to just return null for that property?
Thanks Heaps!
-M