예제 #1
0
        public List <VComment> GetComments(string path)
        {
            var list = new BusinessLayer.Comments(_configuration).GetListByPath(path);

            var flat = list.Select(x => new VComment {
                Comment     = x.Comment,
                DatePosted  = x.DatePosted,
                DomainId    = x.DomainId,
                Id          = x.Id,
                Ip          = x.Ip,
                Name        = x.Name,
                ParentId    = x.ParentId,
                Path        = x.Path,
                QueryString = x.QueryString,
                Children    = new List <VComment>()
            }).ToList();

            var tree = GetTree(flat);

            return(tree);
        }
예제 #2
0
 public HomeController(IConfiguration _configuration) : base(_configuration)
 {
     business = new BusinessLayer.Comments(_configuration);
 }