I have two queries which both work but need to combine them into one working query
Query 1
var now = DateTime.Now;
var twoWeeksAgo = now.AddDays(-14);
var advert =
from m in db.tbl_Property
where m.Prop_Update >= twoWeeksAgo && m.Prop_Update <= now
select m;
Query 2
var Props =
from n in db.tbl_Property.
Where(c => c.Prop_AvailableSpaces > 0)
select n;
Any help or advice welcome
Do you mean something like:
Or perhaps combining with || instead:
(Note that I haven’t used a query expression here as you’re only using a single where clause.)