Asp – LINQ and dbml file


Is there any relation with LINQ and dbml file.someone telling that using Linq in project .Actually that project containing one dbml file,inside that one .cs file,one dbml.layout and designer generated code.Actually notation is something like

var numQuery =
            from num in numbers
            where (num % 2) == 0
            select num;

i didnt find any of the similar syntax in this project

Best Solution

The DBML file represents the data model for a LINQ to SQL project - it's used to generate the C# code for the various entities.

The code you've provided is a LINQ query. I'd certainly expect to see LINQ queries within an application which uses a DBML file, but they are slightly separate. In particular, I wouldn't expect to see queries either within the DBML file itself or in the C# code generated from it. The queries will be in the code which uses those entities.