public GetUserInfo_Result UserProfile([FromBody] CustomModels userData)
        {
            FRDBEntities db = new FRDBEntities();

            using (db)
            {
                return(db.GetUserInfo(userData.email).FirstOrDefault <GetUserInfo_Result>());
            }
        }
        public GetUserInfo_Result EditProfile([FromBody] CustomModels userData)
        {
            FRDBEntities db  = new FRDBEntities();
            FRDBEntities db1 = new FRDBEntities();

            using (db)
            {
                db.UpdateUserInfo(userData.email, userData.firstName, userData.lastName, userData.percentage, userData.annualBudget, userData.location, userData.qualification);
            }


            return(db1.GetUserInfo(userData.email).FirstOrDefault <GetUserInfo_Result>());
        }
        public List <RecommendModel> Recommendation([FromBody] UserSkills skill)

        {
            List <RecommendModel>            RecommendResult = new List <RecommendModel>();
            List <GetRecommenadation_Result> result          = new List <GetRecommenadation_Result>();

            GetUserInfo_Result userInfo = new GetUserInfo_Result();

            using (FRDBEntities db = new FRDBEntities())
            {
                result = db.GetRecommenadation(skill.email).ToList <GetRecommenadation_Result>();
            }

            using (FRDBEntities db = new FRDBEntities())
            {
                userInfo = db.GetUserInfo(skill.email).FirstOrDefault <GetUserInfo_Result>();
            }

            foreach (var obj in result)
            {
                if (obj.annualFee <= userInfo.annualBudget && obj.location == getLocation(userInfo.location) && obj.percentage <= userInfo.percentage && obj.rating > 0)

                {
                    if (obj.rating >= 60)
                    {
                        RecommendResult.Add(new RecommendModel {
                            ratingType = "Highly Recommended", UniversityName = getUniversity(obj.uniId).name, Degree = getDegree(obj.degree).name, fee = obj.annualFee, rating = obj.rating ?? 0, url = getUniversity(obj.uniId).website
                        });
                    }
                    else if (obj.rating <= 60 && obj.rating >= 30)
                    {
                        RecommendResult.Add(new RecommendModel {
                            ratingType = "Moderatly Recommended", UniversityName = getUniversity(obj.uniId).name, Degree = getDegree(obj.degree).name, fee = obj.annualFee, rating = obj.rating ?? 0, url = getUniversity(obj.uniId).website
                        });
                    }
                    else
                    {
                        RecommendResult.Add(new RecommendModel {
                            ratingType = "slightly Recommended", UniversityName = getUniversity(obj.uniId).name, Degree = getDegree(obj.degree).name, fee = obj.annualFee, rating = obj.rating ?? 0, url = getUniversity(obj.uniId).website
                        });
                    }
                }
            }
            return(RecommendResult);
        }