Posted on: 10/16/2013 4:42:49 AM | Views : 645

Hi,
I have watched couple of asp.net online videos and they have mentioned best way to working with data sources is using object data source. Those videos suggest to add ASP.Net folder -> APP_Data in to the project and then copy the SQL data base to this APP_Data.
I would like to know is this best way to do? This way it is very easy to access data via Linq to SQL
Normally my way is create a seperate class(CS Classes) with a connection string to SQL server or add in the webconfig file. when I want to access the db I ll call the connection string and write required SQL statements and use conn.open() to get the data . My thinking is in this case if we want to change the data base location or something else we can easily do it as database and the application is separated.
Can someone please tell me which way is the best way to go ahead or am I miss understood the first way of doing this. Can someone please explain to me , even sample code ...

Go to the complete details ...