| Exam Code/Number: | 070-523Join the discussion |
| Exam Name: | UPG:Transition MCPD.NET Frmwrk 3.5 Web Dev to 4 Web Dev |
| Certification: | Microsoft |
| Question Number: | 118 |
| Publish Date: | May 22, 2026 |
|
Rating
100%
|
|
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. The application uses the following object query
to load a product from the database. (Line numbers are included for reference only.)
01using (AdventureWorksEntities advWorksContext = new AdventureWorksEntities())
02{
03ObjectQuery <Product> productQuery = advWorksContext.Product.Where("it.ProductID = 900");
04
05}
You need to log the command that the query executes against the data source. Which code segment
should you insert at line 04?
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application uses the ADO.NET Entity Framework to model entities. You create an entity as shown in the following code fragment.
<EntityType Name="ProductCategory"> <Key>
<PropertyRef Name="ProductCategoryID" />
</Key>
<Property Name="ProductCategoryID" Type="int" Nullable="false" StoreGeneraedPattern="Identity" />
<Property Name="ParentProductCategoryID" Type="int" />
<Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="50" />
...
</EntityType>
You need to provide two entity-tracking fields: "rowguid that is automatically generated when the entity is created "ModifiedDate that is automatically set whenever the entity is updated Which code fragment should you add to the .edmx file?
You need to recommend appropriate technologies for designing Web forms for entry and retrieval of news
items.
Which technologies should you recommend? (Each correct answer presents a complete solution. Choose
two.)
You are implementing an ASP.NET page. Client-side script requires data. Your application includes a class
named Person with a Name property of type string. The code-behind file of the page includes the following
code segment.
public string JsonValue;
List<Person> people = GetPeopleList();
JavaScriptSerializer json = new JavaScriptSerializer();
You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the
people list.
Which code segment should you use?
You are designing an ASP.NET Web Forms application that uses a database containing user names and
hashed passwords for authentication. The Web application includes a login form in which users type their
user names and passwords.
You need to design a strategy to ensure that the user's login credentials cannot be stolen through a man-
in-the-middle attack.
Which approach should you recommend?