Share on FacebookThis topics may interest both beginner and advanced programmers,
We know that programmer always want to be more faster and more productive so he always search for helpful tactics, ways or tools that help him create big project in lesser time. But unfortunally we knew that dealing with database is the bigger part in a program and sometimes, if we have a big project, designing and engeneering of he Data Access Layer (DAL) of the project may take a lot of time which cause fatigue and Boredom ...
Is that right ? Not any more ...

Greate news for all, thanks for the Subsonic, a new technologie that read your database and converted automatically to code for example if we have a database that contains a table: Employees( ID, Name, Telephone).
The old fashion code is:
Dim Con As New SqlClient.SqlConnection("Data Source=Local;Initial Catalog=MyDatabase;Persist Security Info=True;User ID=sa;Password=sa;Pooling=true")
Dim sql As String = "Insert Into Employees(ID,Name,Telephone) Values(@ID,@Name,@Telephone)"
Dim da As New SqlClient.SqlCommand(sql, Con)
Try
Dim oID As New SqlClient.SqlParameter("@ID", SqlDbType.Int, 8, ParameterDirection.Input)
Dim oName As New SqlClient.SqlParameter("@Name", SqlDbType.Text, 50, ParameterDirection.Input)
Dim oTelephone As New SqlClient.SqlParameter("@Telephone", SqlDbType.Text, 12, ParameterDirection.Input)
oID.Value = txtID.Text
oName.Value = txtName.Text
oTelephone.Value = txtTelephone.Text
da.Parameters.Add(oID)
da.Parameters.Add(oName)
da.Parameters.Add(oTelephone)
Con.Open()
da.ExecuteNonQuery()
Con.Close()
Catch ex As Exception
Throw ex
End Try
But with Subsonic:
Dim oEmp As New Employee
oEmp.ID = txtID.Text
oEmp.Name = txtName.Text
oEmp.Telephone = txtTelephone.Text
oEmp.Save()
That's it. Quiet Easy, Quiet Simple.

Also Read the Subsonic pdf file:
