User1034446946 posted
at the moment I am doing something like
_db.Where(m =>m.Title.Any(t => t.Text == "foo") && m.StartDate <= DateTime.Now && m.EndDate >=DateTime.Now).OrderByDesending(o => o.StartDate).FirstOrDefault();
so I will have multiple records in the db with the title "foo" and I want to order them and get the most resent which is the one which has the importance, and it works
However now i want to have a string array (or list or whatever of titles which I know I can have this
_db.Where(m => m.Title.Any(t => stringArray.Contains(t.Text)) && m.StartDate <= DateTime.Now && m.EndDate >=DateTime.Now)
but now I am a little stuck, I think I need to group by title, order the groups by date and then select the first onesfirst ones for each group, however I want to do this at datebase level as I don't want there return the Title Navigation entities, so selecting
all the records and then running it i want to avoid.
Does anyone have and suggestions?