Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

What are the current best practice/methods to code a VB.NET DAL in SQL Server?

I have been trying to search but can't seem to find the right words to look for.

share|improve this question
    
A. Why would the answer be VB-specific, the same should apply for any .NET language. B. Why VB? In any .NET app you could include any .NET assembly, so don't limit yourself to the "basics". –  Danny Varod Jan 31 '12 at 22:55
    
@DannyVarod I agree 100% with you. But this is what my employer wants so I just needed to be specific haha –  Samjus Jan 31 '12 at 22:57
    
I wouldn't say there is a general best practice. Choose a technology (or examine a few) and then ask about different practices for that technology. (E.g. Entity Framework, nHibernate, DataSets, 3rd party ORMs and etc.) –  Danny Varod Jan 31 '12 at 22:59
    
Probably something like Entity Framework with the Repository pattern. –  Antonio2011a Jan 31 '12 at 23:24
add comment

2 Answers 2

up vote 4 down vote accepted

I think the term you're looking for is ORM (Object Relational Mapping).

Entity Framework is an ORM framework. I would just add that LINQ is a standalone framework that can be used to query data, SQL, Entity Framework or even an XML file, so they are not exactly interchangeable.

share|improve this answer
add comment

LINQ-To-SQL or Entity Framework.

Entity Framework is the most current and tends to enforce better design practices but can be overkill for some projects and may not be the best option for some types of underlying data.

LINQ-To-SQL is easy to use and will fit into most projects rather easily. On the downside, it can be misused more easily than EF.

share|improve this answer
1  
LINQ to SQL was declared as and end of the road technology prior to release of EF1. Therefore I would most definitely not recommend it as a best practice. –  Danny Varod Jan 31 '12 at 22:57
    
@DannyVarod - Microsoft has a nasty tendency to obsolete things too quickly that still work well and replacing them with half-loaf implementations (like EF1). I predict EF will be declared "dead" in late 2012-early 2013 in favor of a poorly implemented NoSQL/BigData style framework. –  jfrankcarr Jan 31 '12 at 23:10
    
I think they would have to create a NoSQL Server first for the NoEF to connect to :-) –  Danny Varod Jan 31 '12 at 23:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.