Hi all.
i am using linq and sqlDataAdapter to connect database and convert it into Datatable . but i get error when i declare DataContext although i also import library for references.
System.Data.Linq.DataContext context;// get error
(Error 1 The type or namespace name 'DataContext' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) C:\Documents and Settings\benzema\Desktop\C#\Resort\WindowsFormsApplication1\App_Code\LinqConnection.cs 18 22 ResortApp
)
Did you know my trouble here?
Thanks and best regards.
Getting error in DataContext
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hirendra SisodiyaRank #258 · 9.8K reputationPosted Apr 25, 2010, 9:35 PM EDT
what framework and library are you using????
i think 'System.Data.Linq.DataContext' does not include by default in framwork2.0, but you can find in 3.5 by default.......
thanks
Please mark as answere if it helps
Lalit MRank #1,186 · 1.5K reputationPosted Apr 25, 2010, 10:36 PM EDT
http://naturalprogression.wordpress.com/2009/08/07/system-data-linq-datacontext-is-defined-in-an-assembly-that-is-not-referenced/
benzema kirism26 reputationPosted Apr 26, 2010, 2:37 AM EDT
it work fine when i change framwork 3.5.
i have trouble about using LINQ ,how to convert the result in var to Datatable (it means that i use sqlDataAdapter connection).
Could you give me suggestion to do this problem?
thanks