[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2655
  • Last Modified:

Data helper class for C#.NET 2.0 and .Net 3.0

Hi,
I am fairly new to C# & .NET.
I did a project last year in VB.Net 1.1, and used something called Microsoft.ApplicationBlocks.Data.dll.

My question is: Is there an equivelent class for C# for .NET version 2.0 for MS SQL Server? one that is standard and generally acceptable in commercial development.

If so, what will happen when .NET 3 is released? will there be a newer version of the helper class?
0
gjok
Asked:
gjok
  • 3
  • 3
1 Solution
 
Bob LearnedCommented:
Look at the Enterprise Library, which is a superset of the DAAB:

Enterprise Library
http://msdn2.microsoft.com/en-us/library/aa480453.aspx

Bob
0
 
gjokAuthor Commented:
Thanks, Ive just installed it and the start menu folder if full of all kinds of stuff. I was kind of just looking for a .cs file
How do I reference this in my application?
i.e.
using Microsoft.ApplicationBlocks.Data; ??
0
 
Bob LearnedCommented:
1) The Enterprise Library DLLs are installed into the Global Assembly Cache (GAC)

2) If you 'Add Reference', on the .NET tab there is the Enterprise Library blocks (Caching, Configuration, Data Access, etc.)

3) If you add a reference the the Enterprise Library Data Access DLL, you should see this under the 'References' in the Solution Explorer:

    Microsoft.Practices.EnterpriseLibrary.Data

4) That will be the namespace that you need to import:

    using Microsoft.Practices.EnterpriseLibrary.Data;

Bob
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
gjokAuthor Commented:
I think Im getting way out of my depth here... just as I was starting to feel confident that I was making progress with .NET.
In my .NET tab, the nearest match I have is: System.EnterpriseServices (path: System.EnterpriseServices.dll) I dont think thats it as I get the error:
"The type or namespace name 'Practices' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?).
I am only using Visual C# Express - is that the problem?
0
 
Bob LearnedCommented:
Well, my friend, since I don't use Express, I can't comment on that, but you should be able to add references to DLLs.  It will be in the list around the E's "Enterprise Library".

Bob
0
 
gjokAuthor Commented:
Well, I can only seem to reference "Microsoft.Practices.EnterpriseLibrary.Common" as there are no other namespaces under "Microsoft.Practices.EnterpriseLibrary".

Anyway, I feel you have pointed me in the right direction...
Thanks
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now