public static List <EventViewModel> GetEventsForMentee(ref DAO.ApplicationContext context, int menteeId) { var myEvents = CalendarHelper.GetEvents(ref context) .Where(x => x.MenteeId == menteeId); return((List <EventViewModel>)myEvents.ToList()); }
public static List <EventViewModel> GetEventsByUserId(ref DAO.ApplicationContext context, int creatorId) { var myEvents = CalendarHelper.GetEvents(ref context) .Where(x => x.CreatorId == creatorId); return((List <EventViewModel>)myEvents.ToList()); }
public static List <EventViewModel> GetMenteeMeetingRequests(ref DAO.ApplicationContext context, int mentorId) { int eventType = DomainHelper.GetIdByKeyValue(ref context, "EventType", "Mentee Meeting Request"); var myEvents = CalendarHelper.GetEvents(ref context) .Where(x => x.EventType == eventType && x.MentorId == mentorId); return((List <EventViewModel>)myEvents.ToList()); }
public static List <EventViewModel> GetPublicEvents(ref DAO.ApplicationContext context) { int eventType = DomainHelper.GetIdByKeyValue(ref context, "EventType", "Public"); var myEvents = CalendarHelper.GetEvents(ref context) .Where(x => x.EventType == eventType); return((List <EventViewModel>)myEvents.ToList()); }