Exemplo n.º 1
0
 private void Aggregate(params Type[] entitiesToAggregate_)
 {
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enDebate)) != null)
     {
         _enComment.Debate_ = new enDebate {
             ID = _enComment.Debate_ID
         };
         var objBLDebate = new blDebate(_enComment.Debate_);
         objBLDebate.Read();
     }
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enUser)) != null)
     {
         _enComment.User_ = new enUser {
             ID = _enComment.User_ID
         };
         var objBLUser = new blUser(_enComment.User_);
         objBLUser.Read();
     }
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enLikeCounter)) != null)
     {
         var objENLikeCounter = new enLikeCounter()
         {
             Debate_ID = _enComment.Debate_ID, User_ID = _enComment.User_ID
         };
         var objBlLikeCounter = new blLikeCounter(objENLikeCounter);
         _enComment.listOfLikeCounter = objBlLikeCounter.ReadAll().Where(x => x.Comment_ID == _enComment.ID).ToList();
         _enComment.LikesCount        = _enComment.listOfLikeCounter.Count;
     }
 }
Exemplo n.º 2
0
 private void Aggregate(params Type[] entitiesToAggregate_)
 {
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enUser)) != null)
     {
         _enPayment.User_ = new enUser()
         {
             Reference_Code = _enPayment.Reference_Code
         };
         var objBLUser = new blUser(_enPayment.User_);
         objBLUser.Read();
     }
 }
 private void Aggregate(params Type[] entitiesToAggregate_)
 {
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enContest)) != null)
     {
         _enContestStatus.Contest_ = new enContest { ID = _enContestStatus.ContestID};
         var objBLContest = new blContest(_enContestStatus.Contest_);
         objBLContest.Read();
     }
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enUser)) != null)
     {
         _enContestStatus.User_ = new enUser { ID = _enContestStatus.UserID };
         var objBLUser = new blUser(_enContestStatus.User_);
         objBLUser.Read();
     }
 }
Exemplo n.º 4
0
 private void Aggregate(params Type[] entitiesToAggregate_)
 {
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enCategory)) != null)
     {
         _enDebate.Category_ = new enCategory {
             ID = _enDebate.Category_ID
         };
         var objBLCategory = new blCategory(_enDebate.Category_);
         objBLCategory.Read();
     }
     if (entitiesToAggregate_.FirstOrDefault(item => item == typeof(enUser)) != null)
     {
         if (_enDebate.User_ID != null)
         {
             _enDebate.User_ = new enUser {
                 ID = _enDebate.User_ID.Value
             };
             var objBLUser = new blUser(_enDebate.User_);
             objBLUser.Read();
         }
     }
 }