nerdexam
Microsoft

70-516 · Question #204

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database and contains a LINQ to SQL data model. The…

Sign in or unlock 70-516 to reveal the answer and full explanation for question #204. The question stem and answer options stay visible for context.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to a Microsoft SQL Server database and contains a LINQ to SQL data model. The data model contains a function named createCustomer that calls a stored procedure. The stored procedure is also named createCustomer. The createCustomer function has the following signature. createCustomer (Guid customerID, String customerName, String address1) The application contains the following code segment. (Line numbers are included for reference only.) 01 CustomDataContext context = new CustomDataContext(); 02 Guid userID = Guid.NewGuid(); 03 String address1 = "1 Main Steet"; 04 String name = "Marc"; 05 ... You need to use the createCustomer stored procedure to add a customer to the database. Which code segment should you insert at line 05?

Options

  • Acontext.createCustomer(userID, customer1, address1);
  • Bcontext.ExecuteCommand("createCustomer", userID, customer1, address1);
  • Ccontext.ExecuteCommand("createCustomer", customer);
  • Dcontext.ExecuteQuery(typeof(Customer), "createCustomer", customer);

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.

Full 70-516 Practice