tags:

views:

16

answers:

1

I have a varialbe name age and that's type is int? My linq to sql query is:

from t in db.Profiles where t.age == age select t

having a comparison between int and int? at where clause. how the query processor of linq to sql will process in this case?

A: 
Randy Minder
But if age is null then the NullPointException will be throwed
Linh
from t in db.Profiles where t.age == (age == null) ? null : age.Value select t
Randy Minder