I Create Method inside InterFace like This List<T> OngoingEvent();
and I implemented the Method Inside Repository
public List<T> OngoingEvent() { var output2 = DbContext.ParticipantsTable.Join(DbContext.EventTable, e => e.EventTableID, d => d.ID, (tbl1, tbl2) => new { Table1 = tbl1, Table2 = tbl2 }).Join(DbContext.VolunteerTable, ee => ee.Table1.VolunteerTableID, dd => dd.ID, (tbl1, tbl2) => new { ID = tbl1.Table1.ID, IsAccepted = tbl1.Table1.IsAccepted, IsAttend = tbl1.Table1.IsAttend, EventName = tbl1.Table2.EventName, EventEndDate = tbl1.Table2.EventEndDate, VolunteerName = tbl2.VolunteerName }).ToList(); return output2; } but I get Error for the return value
Severity Code Description Project File Line Suppression State Error CS0029 Cannot implicitly convert type 'System.Collections.Generic.List<<anonymous type: int Id, bool Accepted, bool Attend, string EventName, string EventEndDate, string VolunteerName>>' to 'System.Collections.Generic.List'
I Try To change List<T> OngoingEvent(); to IEnumerable OngoingEvent();`
and IQueryable OngoingEvent();` but Not working
and I try to use Method like this IQueryable OngoingEvent(Expression<Func<T, bool>> expression); but o don't know how i can deal with it