I am playing around with WCF 4.0. I have a simple service with the following as DataContract:
[DataContract]
public class WeeklySchedule
{
[DataMember]
public DateTime DateMon;
[DataMember]
public string DishMon;
[DataMember]
public DateTime DateTue;
[DataMember]
public string DishTue;
[DataMember]
public DateTime DateWed;
[DataMember]
public string DishWed;
[DataMember]
public DateTime DateThu;
[DataMember]
public string DishThu;
[DataMember]
public DateTime DateFri;
[DataMember]
public string DishFri;
}
I want to build a separate class library to hold the database access methods. I want these methods to return the WeeklySchedule objects.
How can i do this avoiding circular reference?
If i reference the DAL class to the WCF service i can use the db methodss, but the DAL class cannot "see" the DataContract class.