Reputation: 396
I have a table like blow image:
How do I write a LINQ query to bring records of Jan, Feb, March from the table?
my query:
var query = (from c in db.TheMonthlyDelivery select c).AsQueryable();
I am new to LINQ please help me.
Upvotes: 0
Views: 1113
Reputation: 21795
Try this:-
int[] months = { 1, 2, 3 };
var query= db.TheMonthlyDelivery.Where(x => months.Contains(x.Date.Month));
Upvotes: 1