inBloomApiLibrary.SectionDataService.GetSectionStudentAssociationStudentList C# (CSharp) Method

GetSectionStudentAssociationStudentList() public method

Gets students details in student section associations within the sections.
public GetSectionStudentAssociationStudentList ( string accessToken, string sectionId ) : Newtonsoft.Json.Linq.JArray
accessToken string
sectionId string
return Newtonsoft.Json.Linq.JArray
        public JArray GetSectionStudentAssociationStudentList(string accessToken, string sectionId)
        {
            string apiEndPoint = String.Format(ApiHelper.BaseUrl + "/sections/{0}/studentSectionAssociations/students", sectionId);
            return ApiHelper.CallApiForGet(apiEndPoint, accessToken);
        }

Same methods

SectionDataService::GetSectionStudentAssociationStudentList ( string accessToken, string sectionId, int limit, int offset, string views ) : Newtonsoft.Json.Linq.JArray

Usage Example

 public ActionResult GetStudents(string sectionId, int? limit, int? offset, string view)
 {
     if (string.IsNullOrEmpty(sectionId))
     {
         return RedirectToAction("Index");
     }
     try
     {
         var sectionService = new SectionDataService();
         dynamic studentsData = sectionService.GetSectionStudentAssociationStudentList(SessionInfo.Current.AccessToken, sectionId, limit, offset, view);
         return View("GetStudents", studentsData);
     }
     catch(Exception ex)
     {
         Trace.TraceError(ex.Message);
         ViewBag.Error = ex.Message;
         return Content("No students found");
     }
 }