vendredi 7 octobre 2016

Display same data again and again in mvc

this is my linq code--------->     
     var coursename = Session["course"].ToString();
                var location = Session["location"].ToString();
                var result = (from insti in db.Institute_Master
                              join course in db.Course_Detail on insti.InstituteId equals course.InstituteId
                              join coursemaster in db.Course_Master on course.CourseId equals coursemaster.CourseId
                              join  facility in db.Facility_Detail  on insti.InstituteId  equals facility.InstituteId
                              join  masterfacility in db.Facility_Master on facility.FacilityMasterID equals masterfacility.FacilityMasterId
                              where coursemaster.CourseName == coursename || insti.City == location
                              select new
                                  //Id = insti.InstituteId,
                                  name = insti.InstituteName,
                                  university = insti.University,
                                  Contact = insti.ContactNo,
                                  address = insti.Address,
                                  email = insti.EmailId,
                                  zipcode = insti.Zipcode,
                                  country = insti.Country,
                                  state = insti.State,
                                  city = insti.City,
                                  start = insti.EstablishOn,
                                  image = insti.ProfilePhoto,
                                  fees = course.TotalFees,
                                  mode = course.Mode,
                                  coursename = coursemaster.CourseName,
                                  duaration = coursemaster.duration,
                                  discription = coursemaster.Discription,
                                  eligibility = coursemaster.Eligibility,
                                  recognization = coursemaster.Recognization,
                                  facility  = masterfacility.FacilityName


--> I Am Using AngularJs To display a data --> And my Record Is repeating for particular facility

this is my tables This is a problem that display same record again for his facility

Can Any One Help Me in this

Aucun commentaire:

Enregistrer un commentaire