Help with a design
Posted: Fri 09 Dec 2011 17:19
I am looking at how to do the following and why the entity framework doesn't let me do what I want. I Am trying to use the designer first and build my database from it using the generate database :
I want:
1) a People table, which contains name etc
2) a customer table, which contains all the data from people + customer id and other related customer properties
3) a order table linked to the customerId with order details
I have created a person entity, created a customer entity which inherits from person and created a 1 to many association between customer and an order entity.
|Person|<----|Customer|1---------*|Order|
My problem is I can't create a primary key in the customer entity to relate with orders. Am i going about this the wrong way?
I want:
1) a People table, which contains name etc
2) a customer table, which contains all the data from people + customer id and other related customer properties
3) a order table linked to the customerId with order details
I have created a person entity, created a customer entity which inherits from person and created a 1 to many association between customer and an order entity.
|Person|<----|Customer|1---------*|Order|
My problem is I can't create a primary key in the customer entity to relate with orders. Am i going about this the wrong way?