Is it possible to map an entity to "nothing"?

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
object
Posts: 91
Joined: Tue 26 Oct 2010 08:29

Is it possible to map an entity to "nothing"?

Post by object » Tue 25 Jan 2011 12:08

My model has a complex type (ComplexType) used by stored procedures to return result sets. Unfortunately WCF Data Services (OData) does not suppose exposing complex types, only standard entity types. So I converted the complex type into an entity, but now I am getting another problem: this entity is obviously unmapped, so Devart data generator fails to generate C# file for the model complaining about unmatched entity in a conceptual model.

Is there any workaround for this? I could probably map this entity to a non-existing table, but I would like to find something more elegant.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 26 Jan 2011 12:51

The approach with fake table is valid and appropriate.
You can try creating a correct QueryView as well.

object
Posts: 91
Joined: Tue 26 Oct 2010 08:29

Post by object » Wed 26 Jan 2011 12:56

Thanks, creating view seems to be more lightweight.

Post Reply