views:

20

answers:

1

Hi All,

We tried using the below code snippet but showing the syntax error.

var query = (from def in entity.Defect.Where("Owner == @0", "rochs")
             select def).ToList();

Thanks in Advance

+1  A: 

Change your code :

string owner = "rochs";
 var query = (from def in entity.Defect
                    where def.Owner == owner
                         select def).ToList();

Example

  var waCustomers =
    from c in customers
    where c.Region == "WA"
    select c;

Get more info about where

Pranay Rana