I'm trying to create a data model for WCF based off of interfaces from my core object model, but I'm having trouble with some of the associations
Currently I have this in my core data model
public class A : IA {
public string name { /* ... */ }
public EntitySet<B> children { /* ... */ }
}
public class B : IB {
public string name { /* ... */ }
}
However when I define the interface IA I get compiler errors saying A doesn't implement all of IA. Here is the interface
public interface IA<BType> where BType: IB {
string name {get; set;}
IEnumerable<Btype> children {get;}
}
Why can't an instance of A be passed as an IA reference, given these class and interface definitions?