public void AddAvailability(int id, XDocument schedule)
        {
            Yoga_User u = myDb.Yoga_User.Where(x => x.U_Id == id).Single();

            u.Availability = schedule.ToString();
            myDb.SaveChanges();
        }
        public XDocument getAvailability(int id)
        {
            Yoga_User u  = myDb.Yoga_User.Where(x => x.U_Id == id).Single();
            XDocument xd = XDocument.Parse(u.Availability);

            return(xd);
        }
        public void UpdateUser(Yoga_User o)
        {
            var n = myDb.Yoga_User.Where(x => x.U_Id == o.U_Id).Single();

            n.Roles_Id     = o.Roles_Id;
            n.U_First_Name = o.U_First_Name;
            n.U_Last_Name  = o.U_Last_Name;
            n.U_Email      = o.U_Email;
            n.U_Password   = o.U_Password;
            n.U_Phone      = o.U_Phone;
            n.Availability = o.Availability;
            n.U_Birthday   = o.U_Birthday;
            n.Active       = o.Active;

            myDb.SaveChanges();
        }
        public bool emailConfirmation(string email, string token)
        {
            bool      isConfirmed;
            Yoga_User u = getUserByEmail(email).Single();

            if (u.Email_Confirmation == token)
            {
                isConfirmed = true;
                u.Active    = true;
            }
            else
            {
                isConfirmed = false;
            }

            myDb.SaveChanges();
            return(isConfirmed);
        }
        public void CreateUser(Yoga_User y)
        {
            myDb.Yoga_User.Add(y);

            myDb.SaveChanges();
        }