Cross Tab Like EntityHi Im hoping someone can point me in the right direction.<br/><br/>Im looking to create an set of entities that are based on the same table - but in the form of a pivot/crosstab<br/><br/>The following is an example of the sort of thing I am looking to achieve.<br/><br/>We have two tables - eg Objects and Properties<br/><br/>Objects table has two columns - <br/>ObjectID<br/>ObjectName<br/><br/>Properties table has 4 columns including a foreign key to the objects table.<br/>with 3 columns<br/><br/>PropertyID <br/>PropertyName<br/>PropertyType<br/>FK_ObjectID<br/><br/>sample data could be something like<br/><br/>Object<br/>1      Car<br/>2      Motorbike<br/><br/>Properties<br/>1      Make      String      1<br/>2      Colour     String      1<br/>3      Engine     String      1<br/>4      Make       String      2<br/>5      Model      String      2<br/><br/>I would like the entity data model to have 2 entities<br/><br/>Car and Motorbike  <br/>Each wth their corresponding fields <br/><br/>e.g.  Car<br/>ID Make Colour Engine<br/><br/>I know I can use SQL Pivot to create a view of the data and use stored procedures to handle the CRUD.  <br/>But can I create the entities in the designer?<br/><br/>Cheers<br/><br/>John© 2009 Microsoft Corporation. All rights reserved.Thu, 02 Jul 2009 20:00:33 Z743a0367-08b4-43b7-9491-8e5ca569a880http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/743a0367-08b4-43b7-9491-8e5ca569a880#743a0367-08b4-43b7-9491-8e5ca569a880http://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/743a0367-08b4-43b7-9491-8e5ca569a880#743a0367-08b4-43b7-9491-8e5ca569a880Johnlbwhttp://social.msdn.microsoft.com/Profile/en-US/?user=JohnlbwCross Tab Like EntityHi Im hoping someone can point me in the right direction.<br/><br/>Im looking to create an set of entities that are based on the same table - but in the form of a pivot/crosstab<br/><br/>The following is an example of the sort of thing I am looking to achieve.<br/><br/>We have two tables - eg Objects and Properties<br/><br/>Objects table has two columns - <br/>ObjectID<br/>ObjectName<br/><br/>Properties table has 4 columns including a foreign key to the objects table.<br/>with 3 columns<br/><br/>PropertyID <br/>PropertyName<br/>PropertyType<br/>FK_ObjectID<br/><br/>sample data could be something like<br/><br/>Object<br/>1      Car<br/>2      Motorbike<br/><br/>Properties<br/>1      Make      String      1<br/>2      Colour     String      1<br/>3      Engine     String      1<br/>4      Make       String      2<br/>5      Model      String      2<br/><br/>I would like the entity data model to have 2 entities<br/><br/>Car and Motorbike  <br/>Each wth their corresponding fields <br/><br/>e.g.  Car<br/>ID Make Colour Engine<br/><br/>I know I can use SQL Pivot to create a view of the data and use stored procedures to handle the CRUD.  <br/>But can I create the entities in the designer?<br/><br/>Cheers<br/><br/>JohnTue, 23 Jun 2009 22:36:29 Z2009-06-23T22:36:29Zhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/743a0367-08b4-43b7-9491-8e5ca569a880#67d8f5f6-bcc6-42c3-809a-ca89f53e7cfdhttp://social.msdn.microsoft.com/Forums/en-US/adodotnetentityframework/thread/743a0367-08b4-43b7-9491-8e5ca569a880#67d8f5f6-bcc6-42c3-809a-ca89f53e7cfdJulie Lermanhttp://social.msdn.microsoft.com/Profile/en-US/?user=Julie%20LermanCross Tab Like EntityHi John<br/><br/><br/>You can create an entity from a view and then map those entities to Insert/Update/Delete sprocs for the updating.<br/><br/>THat might be the easiest thing if you can create one view that will spit out cars and another view that spits out motorbikes.<br/><br/>But will there be more vehicle types and therefore more entities eventually?<br/><br/>julie<br/><br/>Thu, 02 Jul 2009 19:03:27 Z2009-07-02T19:03:27Z