Microsoft
70-516 · Question #204
70-516 Question #204: Real Exam Question with Answer & Explanation
The correct answer is A. context.createCustomer(userID, customer1, address1);. See the full explanation below for the reasoning.
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);
Community Discussion
No community discussion yet for this question.