This question is locked. New answers and comments are not allowed.
I have Customer and and Order tables in my database. The Order table points back to the Customer table via a field called CustomerId. Wanting the ability to access Order objects through the Customer object, I added a collection to the Customer object:
Now, OpenAccess keeps adding a new switchboard table to my database, 'Customer_Orders' to tie Customer and Order together. This is not what I want, however. My Order table already has a CustomerId field. I want OpenAccess to use the existing CustomerId field to find the Order objects belonging to a specific Customer. Is this possible?
| partial public class Customer |
| { |
| private IList<Order> orders; |
| public IList<Order> Orders |
| { |
| get |
| { |
| if (orders == null) |
| orders = new List<Order>(); |
| return orders; |
| } |
| } |
| } |
Now, OpenAccess keeps adding a new switchboard table to my database, 'Customer_Orders' to tie Customer and Order together. This is not what I want, however. My Order table already has a CustomerId field. I want OpenAccess to use the existing CustomerId field to find the Order objects belonging to a specific Customer. Is this possible?