コード例 #1
0
        public ViewModels.Dictaat getDictaat(string name)
        {
            string pagesPath = name + _pagesDirectory;

            Domain.Dictaat dictaat = _dictaatFactory.GetDictaat(name);
            return(new ViewModels.Dictaat(dictaat));
        }
コード例 #2
0
        public async Task <ViewModels.Dictaat> getDictaat(string dictaatName)
        {
            //from DB
            var details = _context.DictaatDetails
                          .Include("DictaatOwner")
                          .FirstOrDefault(d => d.Name == dictaatName);

            //from file system
            Domain.Dictaat dictaat = _dictaatFactory.GetDictaat(dictaatName);

            //analytics
            var analytics = await _analyticsRepo.GetPageViews(dictaatName);

            return(new ViewModels.Dictaat(dictaat, details, analytics));
        }