//private List<string> GetFavoritesForMain(string userID)
        //{
        //    return UserFavorites.Where(c => c.UserId == userID).OrderBy(o => o.Id).Select(f => f.Favorite).ToList();
        //}

        //internal void AddUserFavorite(string userID, string favoriteToAdd)
        //{
        //    UserFavorites.Add(new UserFavorites() { UserId = userID, Favorite = favoriteToAdd });
        //    SaveChanges();
        //}

        //private List<GoalVM> GetGoalsForMain(string userID)
        //{
        //    //return Goal.Where(u => u.UserId == userID);
        //    return null;
        //}

        internal void AddWeightMeasurment(string userID, BodyMeasurmentsVM bodyMeasurments)
        {
            UserWeight.Add(new UserWeight()
            {
                Date        = bodyMeasurments.Date,
                UserId      = userID,
                UserWeight1 = bodyMeasurments.BodyWeight
            });
            SaveChanges();
        }
        private WeightChangeGrafStat GetWeightStat(string userID)
        {
            var dataToReturn = new WeightChangeGrafStat();


            dataToReturn.DateData = UserWeight
                                    .Where(u => u.UserId == userID)
                                    .OrderBy(e => e.Date)
                                    .Select(c => c.Date).ToArray();

            dataToReturn.WeightData = UserWeight
                                      .Where(u => u.UserId == userID)
                                      .OrderBy(e => e.Date)
                                      .Select(c => c.UserWeight1).ToArray();

            return(dataToReturn);
        }
        private StatisicsVM GetWeightStatFull(string userID)
        {
            var dataToReturn = new StatisicsVM();

            dataToReturn.TypeOfWorkoutSession = "General";

            var Data = new WeightChangeGrafStat();

            Data.DateData = UserWeight
                            .Where(u => u.UserId == userID)
                            .OrderBy(e => e.Date)
                            .Select(c => c.Date).ToArray();

            Data.WeightData = UserWeight
                              .Where(u => u.UserId == userID)
                              .OrderBy(e => e.Date)
                              .Select(c => c.UserWeight1).ToArray();

            dataToReturn.Stats = Data;

            return(dataToReturn);
        }