Hi Bobby!
I am in the process of chossing a good O/R-Mapping tool for a project, and .netTiers retained my attention. I have to tell you that working with n-Tiers architecture is new to me, and that I understand OO programming concepts, but I am no OOP guru. Now, there is one thing with .netTiers that is still obscure to me: How do you handle queries that require a JOIN operation? For example, how would you rewrite the code in your example if the contacts (ContactTitle, ContactName, etc.) would be stored in their own table? Let's say, just for the sake of my question that the tables in Northwind would be defined as follows:
[Customers]
CustomerID
CompanyName
ContactID
Address
City
Region
PostalCode
Country
Phone
Fax
[Contacts]
ContactID
ContactName
ContactTitle
From what I have read up to now, I understand that it would be possible to use a Stored Procedure or a View? Are these the only solutions? I am asking because sometimes, I write code to build my SQL queries dynamically and to include only the tables I need in JOIN operations. This would not be possible with a Stored Proc or a View. I mainly use this technic with Search Forms where the user can specify a variety of parameters to perform the search. It allows me to build a SELECT query that matches the parameters the user specified.
There is a second part to my question. Let's say now that you want to design an Edit form to modify a Customer. How would you handle this with the table schema I gave you above? Or in more generic terms, how do you handle CRUD operations with .netTiers on objects that span over more than one table?
Best regards,
Jean-François Beauchamp
IT Consultant