[FREE]Braindump2go 70-516 PDF Exam Dumps Download (171-180)

MICROSOFT NEWS: 70-516 Exam Questions has been Updated Today! Get Latest 70-516 VCE and 70-516PDF Instantly! Welcome to Download the Newest Braindump2go 70-516 VE&70-516 PDF Dumps: http://www.braindump2go.com/70-516.html (286 Q&As)

Are You Interested in Successfully Completing the Microsoft 70-516 Certification Then Start to Earning Salary? Braindump2go has Leading Edge Developed Microsoft Exam Questions that will Ensure You Pass this 70-516 Certification! Braindump2go Delivers you the Most Accurate, Current and Latest Updated 70-516 Certification Exam Questions Availabe with a 100% Money Back Guarantee Promise!

Exam Code: 70-516
Exam Name: TS: Accessing Data with Microsoft .NET Framework 4
Certification Provider: Microsoft
Corresponding Certifications: MCPD, MCPD: Web Developer 4, MCPD: Windows Developer 4, MCTS, MCTS: Microsoft .NET Framework 4, Data Access

70-516 Dumps,70-516 Dumps PDF,70-516 Exam PDF,70-516 Book,70-516 Study Guide,70-516 eBook,70-516 eBook PDF,70-516 Exam Questions,70-516 Training Kit,70-516 PDF,70-516 Microsoft Exam,70-516 VCE,70-516 Braindump,70-516 Braindumps PDF,70-516 Braindumps Free,70-516 Practice Test,70-516 Practice Exam,70-516 Preparation,70-516 Preparation Materials,70-516 Practice Questions

QUESTION 171
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to develop an application.
You use the Entity Framework Designer to create an Entity Data Model (EDM).
You need to create a database creation script for the EDM.
What should you do?

A.    Use a new Self-Tracking Entities template.
B.    Drag entities to Server Explorer.
C.    Run the Generate Database command.
D.    Select Run Custom Tool from the solution menu.

Answer: C
Explanation:
You can generate the database from the conceptual model: Right-click the Entity Framework designer surface and then choose Generate Database From Model.
The script has been created and saved to a file, but it has not been executed.
Model First
(http://blogs.msdn.com/b/efdesign/archive/2008/09/10/model-first.aspx)

QUESTION 172
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
You need to ensure that the application connects to the database server by using SQL Server authentication.
Which connection string should you use?

A.    SERVER=MyServer; DATABASE=AdventureWorks;
Integrated Security=SSPI; UID=sa; PWD=secret;
B.    SERVER=MyServer; DATABASE=AdventureWorks;
UID=sa; PWD=secret;
C.    SERVER=MyServer; DATABASE=AdventureWorks;
Integrated Security=false;
D.    SERVER=MyServer; DATABASE=AdventureWorks;
Trusted Connection=true;

Answer: B
Explanation:
SQL Server autentification using the passed-in user name and password.
User ID, Uid, User, Password, Pwd Connection String Syntax (ADO.NET)
(http://msdn.microsoft.com/en-us/library/ms254500.aspx)

QUESTION 173
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
You add the following stored procedure to the database.
CREATE PROCEDURE dbo.GetClassAndStudents
AS
BEGIN
SELECT * FROM dbo.Class
SELECT * FROM dbo.Student
END
You create a SqIConnection named conn that connects to the database.
You need to fill a DataSet from the result that is returned by the stored procedure.
The first result set must be added to a DataTable named Class, and the second result set must be added to a DataTable named Student.
Which code segment should you use?

A.    DataSet ds = new DataSet();
SqlDataAdapter ad = new SqlDataAdapter(“GetClassAndStudents”, conn);
ds.Tables.Add(“Class”);
ds.Tables.Add(“Student”);
ad.Fill(ds);
B.    DataSet ds = new DataSet();
SqlDataAdapter ad = new SqlDataAdapter(“GetClassAndStudents”, conn);
ad.TableMappings.Add(“Table”, “Class”);
ad.TableMappings.Add(“Table1”, “Student”) ;
ad.Fill(ds) ;
C.    DataSet ds = new DataSet();
SqlDataAdapter ad = new SqlDataAdapter(“GetClassAndStudents”, conn);
ad.MissingMappingAction = MissingMappingAction.Ignore;
ad.Fill(ds, “Class”);
ad.Fill(ds, “Student”);
D.    DataSet ds = new DataSet();
SqlDataAdapter ad = new SqlDataAdapter(“GetClassAndStudents”, conn);
ad.Fill(ds);

Answer: B
Explanation:
http://msdn.microsoft.com/en-us/library/ms810286.aspx

QUESTION 174
You use Microsoft .NET Framework 4.0 to develop an application that uses the Entity Framework.
The application defines the following Entity SQL (ESQL) query, which must be executed against the mode.
string prodQuery = “select value p from Products as p where p.ProductCategory.Name = @p0″;
You need to execute the query.
Which code segment should you use?

A.    var prods = ctx.CreateQuery<Product>(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();
B.    var prods = ctx.ExecuteStoreCommand(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();
C.    var prods = ctx.ExecuteFunction<Product>(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();
D.    var prods = ctx.ExecuteStoreQuery<Product>(prodQuery,
new ObjectParameter(“p0″, “Road Bikes”)).ToList();

Answer: A
Explanation:
CreateQuery<T>-Creates an ObjectQuery<T> in the current object context by using the specified query string.
ExecuteStoreCommand-Executes an arbitrary command directly against the data source using the existing connection.
ExecuteFunction(String, ObjectParameter[])-Executes a stored procedure or function that is defined in the data source and expressed in the conceptual model; discards any results returned from the function; and returns the number of rows affected by the execution. ExecuteStoreQuery<TElement>(String, Object[])-Executes a query directly against the data source that returns a sequence of typed results.
ObjectContext.CreateQuery<T> Method
(http://msdn.microsoft.com/en-us/library/bb339670.aspx)

QUESTION 175
You use Microsoft .NET Framework 4.0 to develop an application that connects to a Microsoft SQL Server 2008 database.
The application uses nested transaction scopes.
An inner transaction scope contains code that inserts records into the database.
You need to ensure that the inner transaction can successfully commit even if the outer transaction rolls back.
What are two possible TransactionScope constructors that you can use for the inner transaction to achieve this goal? (Each correct answer presents a complete solution. Choose two.)

A.    TransactionScope(TransactionScopeOption.Required)
B.    TransactionScope()
C.    TransactionScope(TransactionScopeOption.RequiresNew)
D.    TransactionScope(TransactionScopeOption.Suppress)

Answer: CD
Explanation:
Required-A transaction is required by the scope.
It uses an ambient transaction if one already exists.
Otherwise, it creates a new transaction before entering the scope.
This is the default value.
RequiresNew-A new transaction is always created for the scope.
Suppress-The ambient transaction context is suppressed when creating the scope.
All operations within the scope are done without an ambient transaction context.
TransactionScopeOption Numeration
(http://msdn.microsoft.com/en-us/library/system.transactions.transactionscopeoption.aspx)

QUESTION 176
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application connects to a Microsoft SQL Server 2008 database.
The database includes a table that contains information about all the employees.
The database table has a field named EmployeeType that identifies whether an employee is a Contractor or a Permanent employee.
You declare the Employee entity base type.
You create a new Association entity named Contractor that inherits the Employee base type.
You need to ensure that all Contractors are bound to the Contractor class.
What should you do?

A.    Modify the .edmx file to include the following line of code:
<NavigationProperty Name=”Type” FromRole=”EmployeeType”
ToRole=”Contractor” />
B.    Modify the .edmx file to include the following line of code:
<Condition ColumnName=”EmployeeType” Value=”Contractor” />
C.    Use the Entity Data Model Designer to set up an association between the Contractor class
and EmployeeType.
D.    Use the Entity Data Model Designer to set up a referential constraint between the primary
key of the Contractor class and EmployeeType.

Answer: B
Explanation:
<Association Name=”FK_OrderDetails_Orders1″>
<End Role=”Orders” Type=”StoreDB.Store.Orders” Multiplicity=”1″>
<OnDelete Action=”Cascade” />
</End>
<End Role=”OrderDetails” Type=”StoreDB.Store.OrderDetails” Multiplicity=”*” /> <ReferentialConstraint>
<Principal Role=”Orders”>
<PropertyRef Name=”ID” />
</Principal>
<Dependent Role=”OrderDetails”>
<PropertyRef Name=”OrderId” />
</Dependent>
</ReferentialConstraint>
</Association>

QUESTION 177
You use Microsoft Visual Studio 2010 and Microsoft ADO.NET Framework 4.0 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?

A.    Apply the FunctionAttribute and ResultTypeAttribute to the stored procedure function.
Use the GetResult<TElement> method to obtain an enumerator of the correct type.
B.    Apply the FunctionAttribute and ParameterAttribute to the stored procedure function and
directly access the strongly typed object from the results collection.
C.    Apply the ResultTypeAttribute to the stored procedure function and directly access the
strongly typed object from the results collection.
D.    Apply the ParameterAttribute to the stored procedure function.
Use the GetResult<TElement> method to obtain an enumerator of the correct type.

Answer: A
Explanation:
You must use the IMultipleResults.GetResult<TElement> Method pattern to obtain an enumerator of the correct type, based on your knowledge of the stored procedure.
FunctionAttribute Associates a method with a stored procedure or user-defined function in the database.
IMultipleResults.GetResult<TElement> Method
(http://msdn.microsoft.com/en-us/library/bb534218.aspx)

QUESTION 178
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You create stored procedures by using the following signatures:
CREATE procedure [dbo].[Product_Insert](@name varchar(50),@price float)
CREATE procedure [dbo].[Product_Update](@id int, @name varchar(50), @price float)
CREATE procedure [dbo].[Product_Delete](@id int)
CREATE procedure [dbo].[Order_Insert](@productId int, @quantity int)
CREATE procedure [dbo].[Order_Update](@id int, @quantity int,@originalTimestamp timestamp)
CREATE procedure [dbo].[Order_Delete](@id int)
You create a Microsoft ADO.NET Entity Data Model (EDM) by using the Product and Order entities as shown in the exhibit:
You need to map the Product and Order entities to the stored procedures.
To which two procedures should you add the @productId parameter? (Each correct answer presents part of the solution. Choose two.)

A.    Product_Delete
B.    Product_Update
C.    Order_Delete
D.    Order_Update

Answer: CD
Explanation:
@productId parameter resides in the order table…

QUESTION 179
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
You use Plain Old CLR objects (POCO) to model your entities.
The application communicates with a Windows Communication Foundation (WCF) Data Services service.
You need to ensure that entities can be sent to the service as XML.
What should you do?

A.    Apply the virtual keyword to the entity properties.
B.    Apply the [Serializable] attribute to the entities.
C.    Apply the [DataContract(IsReference = true)] attribute to the entities.
D.    Apply the [DataContract(IsReference = false)] attribute to the entities.

Answer: C
Explanation:
DataContractAttribute Specifies that the type defines or implements a data contract and is serializable by a serializer, such as the DataContractSerializer.
To make their type serializable, type authors must define a data contract for their type.
IsReference Gets or sets a value that indicates whether to preserve object reference data.

QUESTION 180
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application.
The application uses the ADO.NET Entity Framework to model entities.
You need to create a database from your model.
What should you do?

A.    Run the edmgen.exe tool in FullGeneration mode.
B.    Run the edmgen.exe tool in FromSSDLGeneration mode.
C.    Use the Update Model Wizard in Visual Studio.
D.    Use the Generate Database Wizard in Visual Studio.
Run the resulting script against a Microsoft SQL Server database.

Answer: D
Explanation:
To update the database, right-click the Entity Framework designer surface and choose Generate Database From Model.
The Generate Database Wizard produces a SQL script file that you can edit and execute.


Braindump2go Guarantee:
Pass-Certification 70-516 offers absolute risk free investment opportunity, values your timr and money! Braindump2go latest 70-516 Real Exam Dumps – Your success in 70-516 Exam is certain! Your belief in our 70-516 Exam Dumps is further strengthened with 100% Money Back Promise from Braindump2go!


FREE DOWNLOAD: NEW UPDATED 70-516 PDF Dumps & 70-516 VCE Dumps from Braindump2go: http://www.braindump2go.com/70-516.html (286 Q&A)

         

Braindump2go Testking Pass4sure Actualtests Others
$99.99 $124.99 $125.99 $189 $29.99/$49.99
Up-to-Dated
Real Questions
Error Correction
Printable PDF
Premium VCE
VCE Simulator
One Time Purchase
Instant Download
Unlimited Install
100% Pass Guarantee
100% Money Back