what is Microsoft.Practices.EnterpriseLibrary.Data

RitorMaliks

New Member
I want to know what is \[code\]Microsoft.Practices.EnterpriseLibrary.Data\[/code\] and why we use this dll.what are the benefits of this dll. I want to create a project on 3-tier architecture what is the best way for sql queries.weather i use this dll or go for simple sqlcommand and dataadapter.currently i am working in this way:My Code in DAL File is:\[code\]public void Insert(long id){ connection.Open(); SqlCommand dCmd = new SqlCommand("test_procedure", connection); dCmd.CommandType = CommandType.StoredProcedure; try { dCmd.Parameters.AddWithValue("@id", id); dCmd.ExecuteNonQuery(); } catch { throw; } finally { dCmd.Dispose(); connection.Close(); connection.Dispose(); }}\[/code\]I am confused weather i am working in right way or should i use \[code\]Microsoft.Practices.EnterpriseLibrary.Data\[/code\] and then i create \[code\]DatabaseFactory\[/code\].
 
Back
Top