70-516 · Question #237
You are developing a new feature that displays an auto-complete list to users as they type color names. You have an existing ContosoEntities context object named context. To support the new feature yo
Sign in or unlock 70-516 to reveal the answer and full explanation for question #237. 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 they type color names. You have an existing ContosoEntities context object named context. To support the new feature you must develop code that will accept a string object named text containing a users 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
- ADim parameter = New ObjectParameter
- BDim parameter = New ObjectParameter("text", text & "%")
- CDim parameter = New ObjectParameter("text", text & "%")
- DDim parameter = New ObjectParameter("text", 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.