Entity Framework with Services : several Reference.cs for the same database
-
Hi, I have got a problem. In a web project in 3.5, I have : - a Entity Framework model, linked to a SQL Server 2005 database - two services : 1) a ADO.Net Data Service (ex-Astoria) 2) a WCF Service These two services are both linked to the Entity model. In the client project (it's Silverlight), I added two references, for each of the services. VS2008 creates for me two Reference.cs files, one for each service. The problem is that the two files are containing the same definitions of entities, but VS2008 consider that they are different, because they belongs to two different namespaces. Therefore, if I want to use the two services in the same class, I get an error of ambiguous reference between the two definitions. So I can only use one service in the same class :/ The problem would be resolved if the entities would be defined once. Would it be possible to have only one definition of the entities for the two services reference ?