Esempio n. 1
0
 public IList<TagCount> GetTagCounts()
 {
     var dataservice = new Dataservice();
     IList<TagCount> tagCounts = dataservice.GetTagCounts();
     fillTagCounts(tagCounts);
     return tagCounts;
 }
        public IHttpActionResult GetLewisQuotes()
        {
            Dataservice dataservice = new Dataservice();

            IList<LoremLewisViewModel> vms = dataservice.GetLewisQuotes().Select(q => new LoremLewisViewModel
            {
                Source = q.Source,
                Length = q.Content.Length,
                Content = q.Content
            }).ToList();

            if (vms == null)
            {
                return NotFound();
            }

            return Ok(vms);
        }
Esempio n. 3
0
 public IList<ArchiveItem> GetArchiveDetails()
 {
     var dataservice = new Dataservice();
     IList<ArchiveItem> archiveDetails = dataservice.GetArchiveDetails();
     return archiveDetails;
 }
Esempio n. 4
0
 public BlogPost GetBlogPost(string urlSlug)
 {
     var dataservice = new Dataservice();
     BlogPost blogPost = dataservice.GetBlogPost(urlSlug);
     return blogPost;
 }
Esempio n. 5
0
 public IList<BlogPost> GetBlogPostsByMonth(int month, int year)
 {
     var dataservice = new Dataservice();
     IList<BlogPost> blogPosts = dataservice.GetBlogPostsByMonth(month, year);
     return blogPosts;
 }
Esempio n. 6
0
 public IList<BlogPost> GetBlogPostsByTag(string tagUrlSlug, int skip = 0, int take = 10)
 {
     var dataservice = new Dataservice();
     IList<BlogPost> blogPosts = dataservice.GetBlogPostsByTag(tagUrlSlug, skip, take);
     return blogPosts;
 }
Esempio n. 7
0
 public IList<BlogPost> GetBlogPosts(int skip = 0, int take = 10)
 {
     var dataservice = new Dataservice();
     IList<BlogPost> blogPosts = dataservice.GetBlogPosts(skip, take);
     return blogPosts;
 }
Esempio n. 8
0
 public string GetTagNameFromSlug(string urlSlug)
 {
     var dataservice = new Dataservice();
     string tagName = dataservice.GetTagNameFromSlug(urlSlug);
     return tagName;
 }