Posts

Showing posts from January, 2018

Consume Microsoft Enterprise Library – Data Access Application Block

Image
If you planning to use the Microsoft Enterprise Library in your existing/next .Net project, you can do this by following the below steps Step 1. Add the assemblies of references of Microsoft Enterprise Library. You can do this by NuGet package manager and search for Enterprise Library Data and install Enterprise Library – Data Access Application Block. Step 2. Once the required assemblies are added to the project. The next step is to consume the assemblies based on the need of the project. Here, I am going to explain how to do the database operations. First thing first, add the below references to your class. using Microsoft.Practices.EnterpriseLibrary.Data; using Microsoft.Practices.EnterpriseLibrary.Data.Sql; Create abstract class “Database” Object        Use below code to set the connection string        Step 3. Once the database object is ready, you can perform any DML operation on database.