Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

New Post: Complex type as ID

$
0
0

Hi Roger,

Using complex types as IDs is not something that is on our immediate plans although we do occasionally hear requests for it. It is certainly something that it would be possible to do but it would cut across a lot of the stack and so would be a fair amount of work.

Another area that we really would like to work on is providing more flexible O/C mapping. This might allow you to achieve the same thing by having one or more columns in the conceptual model be mapped to something like a complex type in the object model. This may be a better approach for two reasons:

- More generally flexible O/C mapping allows other interesting patterns in addition to this kind of thing. For example, factory methods.
- It doesn't impact a lot of the stack since the conceptual model and everything that acts on it remains unchanged.

A disadvantage of this approach is that the conceptual model is not changed and hence if you expose the model as something like an OData feed then you would not see the key as a complex type but rather as individual properties. Does this seem like a problem from your perspective?

Thanks,
Arthur


Viewing all articles
Browse latest Browse all 10318

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>