public ActionResult GetAttendees(string searchTerm, int pageSize, int pageNum) { //Get the paged results and the total count of the results for this query. AttendeeRepository ar = new AttendeeRepository(); List <LocationMaster> attendees = ar.GetAttendees(searchTerm, pageSize, pageNum); int attendeeCount = ar.GetAttendeesCount(searchTerm, pageSize, pageNum); //Translate the attendees into a format the select2 dropdown expects Select2PagedResult pagedAttendees = AttendeesToSelect2Format(attendees, attendeeCount); //Return the data as a jsonp result return(new JsonpResult { Data = pagedAttendees, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
private List <Attendee> GetAttendees() { var attendees = AttendeeRepository.GetAttendees(); return(attendees.ToList()); }