Microsoft
70-516 · Question #160
70-516 Question #160: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #160. The question stem and answer options stay visible for context.
Question
You are developing a new feature that displays an auto-complete list to users as the type color names. You have an existing ContosoEntities context object named contex. To support the new feature you must develop code that will accept a string object named text containing a user's partial input and will query the Colors database table to retrieve all color names that begin with that input. You need to create an Entity SQL (ESQL) query to meet the requirement. The query must not be vulnerable to a SQL injection attack. Which code segment should you use?
Options
- Avar parameter = new ObjectParameter("text", text + "%");
- Bvar parameter = new ObjectParameter("text", text + "%");
- Cvar parameter = new ObjectParameter("text", text + "%");
- Dvar parameter = new ObjectParameter("text",
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.