Hello Greg,
From your post, my understanding on this issue is: you wonder the best
practice of data accessing behavior. If I'm off base, please feel free to
let me know.
As we know, there are a lot of practices/solutions to do the data access.
For instance,
(1) We can use ADO.NET
(
http://msdn2.microsoft.com/en-us/library/h43ks021(VS.71).aspx) to hard
code Insert/Update/Select commands
(2) We can use LINQ
(
http://msdn2.microsoft.com/en-us/netframework/aa904594.aspx) if .net 3.5
is available to the development/deployment environment.
(3) Enterprise Library
(
http://msdn2.microsoft.com/en-us/library/aa480453.aspx) is also a very
good library based on ADO.NET
(4) Subsonic (
http://www.codeplex.com/subsonic) can automatically generate
the data access layer of a project according to the database schema, so
that programmers can focus on the business logic.
(5) or we can also build our own data access layer by applying DAO design
pattern.
http://java.sun.com/blueprints/patterns/DAO.html
Etc.
All in all, there are a lot of good practices to do the data access. It is
really hard to tell which one is the best. It depends on the real situation
to choose the fittest solution. For instance, if the database has a lot of
tables, views, we may consider the solution (4) subsonic, which can
generate the data access codes automatically, and save a lot of time for
the developer. But if the data access involves a lot of cross-table
operations, I'd suggest (2) or (3) or (5).
Regards,
Jialiang Ge (
[email protected], remove 'online.')
Microsoft Online Community Support
==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document:
http://blogs.msdn.com/msdnts/pages/postingAlias.aspx
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.