public VoBlog GetBlog(int blogId) { //Demonstration of creating an AmbientDbContext in readonly mode using (new DbContextScopeFactory().CreateAmbientDbContextInReadonlyMode <BloggerDbContext>()) { var blog = _blogOperations.GetBlog(blogId); var voBlog = new VoBlog { Overview = blog.Overview, CreatedDateTime = blog.CreatedDate, PostId = blog.PostId }; var post = _postOperations.GetPost(blog.PostId); voBlog.Post = new VoPost { Content = post.Content, Meta = post.Meta, ShortDescription = post.ShortDescription, Title = post.Title }; return(voBlog); } }