LINQ in Action roller

InvalidCastException thrown after supplying DataContext with connection string

Okay, here's the situation. I'm trying to convert my old LINQ to SQL queries to ones that take into account which server the application is running on. If it's on one server, it will query a development database. If it's on another server, it will query a live database. The old queries look something like this: Code Snippet MyDataContext dc = new MyDataContext(); var query = from t in dc.table select t; foreach (var result in query) { //do stuff... } By default this was querying the live database. Read More...
Published Tuesday, April 22, 2008 1:30 AM by MSDN Forums: LINQ Project General
Anonymous comments are disabled

Featured Item

This Blog

Sponsoring

Syndication