Connection string in LINQ - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Sunday, June 26, 2011

Connection string in LINQ

It is very common that you come across scenario when at run time you need to change the database server and so the connection string is used in your LINQ. This may come as requirement, if you are moving your application from dev server to staging and from staging to production.

There are two ways you can change connection string on fly

  1. Edit config file
  2. Build connection string to pass as constructor of DataContext.

No comments:

Post a Comment