Microsoft
70-516 · Question #94
70-516 Question #94: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #94. The question stem and answer options stay visible for context.
Question
You use Microsoft .NET Framework 4.0 to develop an application that uses WCF Data Services to persist entities from the following Entity Data Model. You create a new Blog instance named newBlog and a new Post instance named newPost as shown in the following code segment. (Line numbers are included for reference only.) 01 Blog newBlog = new Blog(); 02 Post newPost = new Post(); 03 .... 04 Uri serviceUri = new Uri("..."); 05 BlogsEntities context = new BlogsEntities(serviceUri); 06 .... You need to ensure that newPost is related to newBlog through the Posts collection property and that newPost and newBlog are sent to the service. Which code segment should you insert at line 06?
Exhibit
Options
- Acontext.AttachLink(newBlog, "Posts", newPost);
- BnewBlog.Posts.Add(newPost);
- CnewBlog.Posts.Add(newPost);
- DnewBlog.Posts.Add(newPost);
Unlock 70-516 to see the answer
You've previewed enough free 70-516 questions. Unlock 70-516 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
