public ActionResult AllApplications() { var obj = GetData(); var dbinstitutes = db.BI_Affi_ins_pop_visited_institute(Convert.ToInt32(obj.Institute_Id)).ToList(); ComFeedBack comfb = new ComFeedBack(); string[] instituteName = new string[4] { "Faculty", "Labortries", "Library", "Other" }; List <DDLComMemberCheckPoint> checklist = new List <DDLComMemberCheckPoint>(); List <InstituteForMembersAllApplications> ifmlist = new List <InstituteForMembersAllApplications>(); InstituteForMembersAllApplications dummy = new InstituteForMembersAllApplications(); dummy.InstituteName = "Select Institute"; ifmlist.Add(dummy); foreach (var ins in dbinstitutes) { InstituteForMembersAllApplications ifm = new InstituteForMembersAllApplications(); ifm.InstituteId = Convert.ToInt32(ins.Institute_ID); ifm.InstituteName = ins.Institute_Name; ifmlist.Add(ifm); } for (var i = 0; i < instituteName.Length; i++) { DDLComMemberCheckPoint ddl = new DDLComMemberCheckPoint(); ddl.CheckName = instituteName[i]; checklist.Add(ddl); } comfb.InstitutesDDL = ifmlist; comfb.CheckPoint = checklist; return(View(comfb)); }