public int SignUp([FromBody] CustomModels userData)
      {
          FRDBEntities db = new FRDBEntities();
          int          id = db.GetUserId(userData.email).FirstOrDefault <int?>() ?? default(int);;

          if (id.Equals(0))
          {
              return(db.UserSignUp(userData.email, userData.password, userData.firstName, userData.lastName, userData.percentage, userData.annualBudget, userData.location, userData.qualification));
          }
          return(0);
      }
        public int DeleteInterset([FromBody] DeleteModels interest)

        {
            FRDBEntities db = new FRDBEntities();
            int          interestId, UserId;

            using (FRDBEntities db1 = new FRDBEntities())
            {
                interestId = db1.GetInterestByName(interest.value).FirstOrDefault <GetInterestByName_Result>().id;
            }
            using (FRDBEntities db2 = new FRDBEntities())
            {
                UserId = db2.GetUserId(interest.email).FirstOrDefault() ?? 0;
            }
            using (db)
            {
                return(db.DeleteUserInterest(UserId, interestId));
            }
        }
        public int DeleteSkills([FromBody] DeleteModels skill)

        {
            FRDBEntities db = new FRDBEntities();
            int          SkillId, UserId;

            using (FRDBEntities db1 = new FRDBEntities())
            {
                SkillId = db1.GetSkillByName(skill.value).FirstOrDefault <GetSkillByName_Result>().id;
            }
            using (FRDBEntities db2 = new FRDBEntities())
            {
                UserId = db2.GetUserId(skill.email).FirstOrDefault() ?? 0;
            }
            using (db)
            {
                return(db.DeleteUserSkills(UserId, SkillId));
            }
        }
        public int DeleteHobbies([FromBody] DeleteModels hobby)

        {
            FRDBEntities db = new FRDBEntities();
            FRDBEntities db1 = new FRDBEntities();
            int          id, hid;

            using (db1)

            {
                int?i = db1.GetUserId(hobby.email).FirstOrDefault();
                id = i ?? 0;
            }
            using (FRDBEntities db2 = new FRDBEntities())
            {
                hid = db2.GetHobbyByName(hobby.value).FirstOrDefault <GetHobbyByName_Result>().id;
            }
            using (db)

            {
                return(db.DeleteUserHobbies(id, hid));
            }
        }