peter
peter

Reputation: 8682

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

Upvotes: 0

Views: 2409

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1502935

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.

Upvotes: 2

Related Questions