Exemplo n.º 1
0
        public PostDTO GetPost(string year, string month, string day, string title)
        {
            using (var context = new BlogSpotContext())
            {
                var repository = new PostsRepository(context);
            }

            return(null);
        }
Exemplo n.º 2
0
        public ICollection <PostDTO> get()
        {
            using (var context = new BlogSpotContext())
            {
                var repository = new PostsRepository(context);
                var posts      = repository.GetPostsRange(1 - 1, 10);

                var postsDto = Mapper.Map <ICollection <Post>, ICollection <PostDTO> >(posts);
                return(postsDto);
            }
        }