Reputation: 2163
Hi I'm having difficulties writing my linq query. Not sure where to put my Where clause.
using (var ctx = DB.Get())
{
Interaction = new BindableCollection<InteractionDTO>(
ctx.Interactions.Select(
x => new InteractionDTO
{
Indepth = x.Indepth
}
)
);
}
where do I put this code or how do i write it in a manner it'll work with the syntax above.
where date>= StartDate.SelectedDate.Value
Upvotes: 0
Views: 71
Reputation: 1747
try this one
ctx.Interactions
.where (x=> date >=x.StartDate)
.Select(x => new InteractionDTO
{
Indepth = x.Indepth
});
Upvotes: 2
Reputation: 101732
Something like this should work
ctx.Interactions.
.Where(x => x.date >= StartDate.SelectedDate.Value)
.Select(x => new InteractionDTO
{
Indepth = x.Indepth
})
Upvotes: 2