Esempio n. 1
0
        private UserPostCommentBM ConvertToCommentBM(UserPostComment c)
        {
            return new UserPostCommentBM()
                  {
                      Id = c.Id,
                      UserId = c.UserId,
                      UserName = c.User.Name,
                      Comment = c.Comment,
                      PostId = c.PostId,

                      CreatedBy = c.CreatedBy,
                      CreationDate = c.CreationDate,
                      ModificationDate = c.ModificationDate,
                      ImageUrl = c.User.UserGeneralInfo.Select(x=>x.Image).FirstOrDefault()

                  };
        }
Esempio n. 2
0
        private UserPostCommentBM ConvertToBM(UserPostComment model)
        {
            if (model == null)
                return null;
            else
            return new UserPostCommentBM()
            {
                Id = model.Id,
               UserId=model.UserId,
               Comment=model.Comment,
               PostId=model.PostId,
               CreatedBy=model.CreatedBy,
               CreationDate=model.CreationDate,
                ModifiedBy = model.ModifiedBy,
                ModificationDate = model.ModificationDate

            };
        }