I am trying to create 3 tables represented by pocos for use in code first.
The tables are customer, item and orders. (i presume the orders is a good naming convetion? or should i use customitem, or customeritem?)
I have created a customer table with an Id and things like Name, Address
I have created an item table with an Id and things like itemname and price.
Now i need to create a 3rd table which will hold the number of items a customer has purchased. I have an Id so i need to create 2 foreign keys (int) 1 called CustomerId and the other called ItemId - is this correct?
Then i need to create a navigation property from customers so i can see all the items that the customers has purchased
and navigation property for an item so you can see which customers has purchased that item
I am a little lost of how to do this
Does anyone have an example or can help me?
I presume its a standard question, how to create customers and items and store who purchased what but i can't seem to find any tutorials
Thanks in advance