Wednesday, May 2, 2012

Linq IsNull for DateTime

var
result = from r in Dsdod.Tables[0].AsEnumerable()where r.IsNull("startdate") != true && r.IsNull("expirydate") != true && r.IsNull("category") != true && CurrentIST >= (r.Field<DateTime>("startdate")) && CurrentIST < (r.Field<DateTime>("expirydate"))select new { Id = r.Field<Int32>("adid"), PromoCode = r.Field<string>("category") };

No comments:

Post a Comment