//public IEnumerable<Support> GetSupports(IEnumerable<int> id)
        //{
        //    List<Support> Supports = new List<Support> { };
        //    Support Support;
        //    foreach (int item in id)
        //    {
        //        Support = GetSupport(item);
        //        yield return Support;
        //        //Supports.Add(Support);
        //    }
        //    // return Supports;

        //}

        //public IEnumerable<Support> GetTop20SupportsOfFollowings(int userId)
        //{

        //    //var supports = SupportRepository.GetMany(s => s.Goal.GoalType == false).OrderByDescending(s => s.SupportedDate).Take(20).ToList();
        //    var supports = (from s in SupportRepository.GetMany(s => s.Goal.GoalType == false) where (from f in followUserRepository.GetMany(fol => fol.FromUserId == userId) select f.ToUserId).ToList().Contains(s.UserId) select s).OrderByDescending(s => s.SupportedDate).Take(20);
        //    return supports;
        //}
        //public IEnumerable<Support> GetTop20Support(int userid)
        //{

        //    var supports = SupportRepository.GetMany(s => (s.Goal.GoalType == false) && (s.UserId == userid)).OrderByDescending(s => s.SupportedDate).Take(20).ToList();
        //    return supports;
        //}
        public void CreateUserSupport(GroupUpdateSupport support)//, ISupportInvitationService supportInvitationService)
        {
            var oldUser = GroupUpdateSupportRepository.GetMany(g => g.GroupUserId == support.GroupUserId && g.GroupUpdateSupportId == support.GroupUpdateSupportId);
            if (oldUser.Count() == 0)
            {
                GroupUpdateSupportRepository.Add(support);
                SaveSupport();
            }
            // supportInvitationService.AcceptInvitation(support.GoalId, support.UserId);
        }
 public void CreateSupport(GroupUpdateSupport Support)
 {
     GroupUpdateSupportRepository.Add(Support);
     SaveSupport();
 }