views:

283

answers:

2

Hello, I have the next EF diagram: Image

and the code service:

[EnableClientAccess()]
public class DomainService1 : LinqToEntitiesDomainService<db1Entities1>
{
    public IQueryable<Entity1> GetMaster1()
    {
        return this.Context.Master.OfType<Entity1>();
    }

    public IQueryable<Entity2> GetMaster2()
    {
        return this.Context.Master.OfType<Entity2>();
    }
}

In the compile process I have the next errors:

Error 1 The type 'TestInheritance.Web.Entity1' already contains a definition for '_typeId' D:\FAUst\SourceExamples\TestInheritance\TestInheritance\Generated_Code\TestInheritance.Web.g.cs 183
Error 2 The type 'TestInheritance.Web.Entity1' already contains a definition for 'TypeId' D:\FAUst\SourceExamples\TestInheritance\TestInheritance\Generated_Code\TestInheritance.Web.g.cs 273
Error 3 The type 'TestInheritance.Web.Entity2' already contains a definition for '_typeId' D:\FAUst\SourceExamples\TestInheritance\TestInheritance\Generated_Code\TestInheritance.Web.g.cs 310
Error 4 The type 'TestInheritance.Web.Entity2' already contains a definition for 'TypeId' D:\FAUst\SourceExamples\TestInheritance\TestInheritance\Generated_Code\TestInheritance.Web.g.cs 400

What I can doing that except this errors?

+1  A: 

You can't use inheritance like that with RIA Services. Anything you load to RIA Services that requires knowledge of the inheritance is going to fail.

Colin Blair