PrepAway - Latest Free Exam Questions & Answers

Category: 70-516 (v.2)

Exam 70-516: TS: Accessing Data with Microsoft .NET Framework 4 (update October 26th, 2015)

You need to connect the existing POCO classes to an Entity Framework context

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to enhance an existing
application to use the Entity Framework. The classes that represent the entities in the model are
Plain Old CLR Object (POCO) classes. You need to connect the existing POCO classes to an Entity
Framework context. What should you do?

You need to add a function that returns the number of years since a person was hired

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. The model includes the entity
shown in the following exhibit.

You need to add a function that returns the number of years since a person was hired. You also need
to ensure that the function can be used within LINQ to Entities queries. What should you do?

You need to add a new type to your model that organizes scalar values within an entity

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. You use the ADO.NET Entity Framework to
model entities. You need to add a new type to your model that organizes scalar values within an
entity. You also need to map stored procedures for managing instances of the type. What should you
do?

You need to ensure that the result sets are returned as strongly typed values

You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4 to create an application.
The application connects to a Microsoft SQL Server 2008 database. You use the ADO.NET LINQ to
SQL model to retrieve data from the database. You use stored procedures to return multiple result
sets. You need to ensure that the result sets are returned as strongly typed values. What should you
do?

Which code segment should you use?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server database. You use the ADO.NET LINQ to SQL model
to retrieve data from the database. The application contains the Category and Product entities, as
shown in the following exhibit.

You need to ensure that LINQ to SQL executes only a single SQL statement against the database. You
also need to ensure that the query retrieves the list of categories and the list of products. Which
code segment should you use?

You need to add the property to Product

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application.
You use the Entity Framework Designer to create an Entity Data Model from an existing database by
using the Generate from database wizard. The model contains an entity type named Product. The
Product type requires an additional property that is not mapped to a database column. You need to
add the property to Product. What should you do?

Which code segment should you use?

You use Microsoft .NET Framework 4 to develop an ASP.NET application. The application uses
Integrated Windows authentication. The application accesses data in a Microsoft SQL Server 2008
database that is located on the same server as the application. You use the following connection
string to connect to the database.
Integrated Security=SSPI; Initial Catalog=AdventureWorks;
The application must also execute a stored procedure on the same server on a database named
pubs.
Users connect to the ASP.NET application through the intranet by using Windows-based
authentication. You need to ensure that the application will use connection pooling whenever
possible and will keep the number of pools to a minimum. Which code segment should you use?

Which connection string should you add to the .config file?

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The
application connects to a Microsoft SQL Server 2008 database. The application uses a Microsoft
ADO.NET SQL Server managed provider. When a connection fails, the application logs connection
information, including the full connection string. The information is stored as plain text in a .config
file. You need to ensure that the database credentials are secure. Which connection string should
you add to the .config file?

You need to ensure that all the requested data is retrieved

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 ADO.NET LINQ to
SQL model to retrieve data from the database. The application will not modify retrieved data. You
need to ensure that all the requested data is retrieved. You want to achieve this goal using the
minimum amount of resources. What should you do?


Page 5 of 31« First...34567...102030...Last »