I have a domain model specifying the interfaces or my domain and I'm using DI to hook it up to an entity framework 4 repository implementation. In my domain I have the following:
public interface IInboundGateway : IGateway
{
ICollection<IInboundNumber> InboundNumbers { get; set; }
}
I then have my entity framework model that has generated the InboundGateway class:
public partial class InboundGateway : EntityObject
{
public EntityCollection<InboundNumber> InboundNumbers { get; set; }
}
In order to implement the IInboundGateway inteface I created a partial InboundGateway class.
public partial class InboundGateway : IInboundGateway
{
}
Eventhough EntityCollection<> implements ICollection<> and InboundNumber implements IInboundNumber I am getting an error reporting that InboundGateway does not implement interface IInboundGateway.InboundNumbers because InboundGateway.InboundNumbers does not have the matching return type ICollection<IInboundNumber>
Im pretty certain this is mental as EntityCollection does implement ICollection and InboundNumber does implement IInboundNumber.
Any help would be massively appreciated thanks.