Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Below code throwing an exception.

C#
query = query.where(x=>x.dbo == cretiera.DateOfBirth);


where, x.dbo is nullable Datetime and cretiera.DateOfBirth is DateTime.

Please help.
Posted
Comments
Fredrik Bornander 5-Aug-13 8:39am    
What exception is being thrown?
Naz_Firdouse 5-Aug-13 8:42am    
try similar to this
var q = from item in _SomeCollection
where object.Equals(item.Name, "ABC")
select item;

Make your code line as shown below :

query = query.where(x=> x.dbo != null && x.dbo == cretiera.DateOfBirth);
 
Share this answer
 
Hi,

It seems that cretiera is your entity. Right? Then in your entity change get set propert to this

public DateTime? DateOfBirth {get; set;}

Hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900