I’m getting System.StackOverflowException on :
SchedulerAjaxData(events)
here is my code
[code]public ActionResult Data(int LeagueId, DateTime from, DateTime to)
{
var lstCourtId = Db.Courts
.AsNoTracking()
.Include(i => i.League)
.Where(w => w.League.LeagueID == LeagueId)
.Select(c => c.CourtID).ToList();
var events = Db.Events
.AsNoTracking()
.Include(i => i.Players.Select(s => s.Player))
.Include(i => i.Guests.Select(s => s.Guest))
.Where(w => lstCourtId.Contains(w.CourtID.Value))
.Where(w => w.end_date > from && w.start_date < to).ToList();
return new SchedulerAjaxData(events);
}[/code]
I think the problem can be because my “Recurring” object has “many to many” relation with Players and Guests.
If I comment the 2 includes, that work…
can you help me ?
can I see trace inside SchedulerAjaxData ?