public PostDTO GetPost(string year, string month, string day, string title) { using (var context = new BlogSpotContext()) { var repository = new PostsRepository(context); } return(null); }
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); } }