Category: Veritas

Veritas 70-516 Dumps, Latest Updated Veritas 70-516 Certification Online

Welcome to download the newest Pass4itsure PGMP dumps:

Veritas 70-516 certification exam for Cisco certification are easily out there on the internet. Now you need not hanker once the projection materials in the market. FLYDUMPS helps materialize your dreams of success with the very least effort. Veritas 70-516 exam sample questions are the option of all IT institutions who aspire to obtain Cisco certification. Flydumps Veritas 70-516 exam sample questions would be the best choice for your Veritas 70-516 certification Veritas 70-516 test. It must be clear that, with the Flydumps Veritas 70-516 exam sample questions you not merely get questions as you may well presume from Flydumps, but you would moreover get fit and accurate answers so this you get a firm grasp of the information. The Veritas 70-516 exam sample questions that we can provide are based on the extensive exploring and real-world experiences on our online trainers, with for the duration of 10 ages of IT and certification experience.

QUESTION 28
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You create a Data Access Layer (DAL) that is database-independent.
The DAL includes the following code segment. (Line numbers are included for reference only.)
01 static void ExecuteDbCommand(DbConnection connection) 02 {
03 if (connection != null){
04 using (connection){
05 try{
06 connection.Open();
07 DbCommand command = connection.CreateCommand();
08 command.CommandText = “INSERT INTO Categories (CategoryName) VALUES (‘Low Carb’)”;
09 command.ExecuteNonQuery();
10 }

12 catch (Exception ex){
13 Trace.WriteLine(“Exception.Message: ” + ex.Message);
14 }
15 }
16 }
17 }

You need to log information about any error that occurs during data access. You also need to log the data provider that accesses the database.
Which code segment should you insert at line 11?

A. catch (OleDbException ex){Trace.WriteLine(“ExceptionType: ” + ex.Source);Trace.WriteLine(“Message: ” + ex.Message);}
B. catch (OleDbException ex){Trace.WriteLine(“ExceptionType: ” + ex.InnerException.Source);Trace.WriteLine(“Message: ” + ex.InnerException.Message);}
C. catch (DbException ex){Trace.WriteLine(“ExceptionType: ” + ex.Source);Trace.WriteLine(“Message: ” + ex.Message); }
D. catch (DbException ex){Trace.WriteLine(“ExceptionType: ” + ex.InnerException.Source);Trace.WriteLine(“Message: ” + ex.InnerException.Message);}

Correct Answer: C Explanation
Explanation/Reference:
Explanation:

Exception.InnerException Gets the Exception instance that caused the current exception. Message Gets a message that describes the current exception.
Exception.Source Gets or sets the name of the application or the object that causes the error. OleDbException catches the exception that is thrown only when the
underlying provider returns a warning or error for an OLE DB data source.
DbException catches the common exception while accessing data base.

QUESTION 29
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Forms application. The application connects to a Microsoft SQL Server database.
You need to find out whether the application is explicitly closing or disposing SQL connections.
Which code segment should you use?
A. string instanceName = Assembly.GetEntryAssembly().FullName;PerformanceCounter perf = new PerformanceCounter(“.NET Data Provider for SqlServer”,”NumberOfReclaimedConnections”, instanceName, true);int leakedConnections = (int)perf.NextValue();
B. string instanceName = Assembly.GetEntryAssembly().GetName().Name;PerformanceCounter perf = new PerformanceCounter(“.NET Data Provider for SqlServer”,”NumberOfReclaimedConnections”, instanceName, true);int leakedConnections = (int)perf.NextValue();
C. string instanceName = Assembly.GetEntryAssembly().FullName;PerformanceCounter perf = new PerformanceCounter(“.NET Data Provider for SqlServer”,”NumberOfNonPooledConnections”, instanceName, true);int leakedConnections = (int)perf.NextValue();
D. string instanceName = Assembly.GetEntryAssembly().GetName().Name;PerformanceCounter perf = new PerformanceCounter(“.NET Data Provider for SqlServer”,”NumberOfNonPooledConnections”, instanceName, true);int leakedConnections = (int)perf.NextValue();

Correct Answer: A Explanation
Explanation/Reference:
Explanation:
NumberOfNonPooledConnections The number of active connections that are not pooled. NumberOfReclaimedConnections The number of connections that have been reclaimed through garbage collection where Close or Dispose was not called by the application. Not explicitly closing or disposing connections hurts performance. Use of ADO.NET performance counters
QUESTION 30
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL Server 2008 database.
You add the following stored procedure to the database.
CREATE PROCEDURE GetProducts AS BEGIN SELECT ProductID, Name, Price, Cost FROM Product END
You create a SqlDataAdapter named adapter to execute the stored procedure. You need to fill a DataTable instance with the first 10 rows of the result set.
What are two possible code segments that you can use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. DataSet ds = new DataSet();adapter.Fill(ds, 0, 10, “Product”)
B. DataSet ds = new DataSet();DataTable dt = ds.Tables.Add(“Product”);adapter.Fill(0, 10, dt);
C. DataSet ds = new DataSet();DataTable dt = ds.Tables.Add(“Product”); dt.ExtendedProperties[“RowCount”] = 10; dt.ExtendedProperties[“RowIndex”] = 0; adapter.Fill(dt);
D. DataSet ds = new DataSet(); ds.ExtendedProperties[“RowCount”] = 10; ds.ExtendedProperties[“RowIndex”] = 0; adapter.Fill(ds);
Correct Answer: AB Explanation

Explanation/Reference:
Explanation:
Fill(Int32, Int32, DataTable()) Adds or refreshes rows in a DataTable to match those in the data source starting at the specified record and retrieving up to the specified maximum number of records. (Inherited from DbDataAdapter.) Fill(DataSet, Int32, Int32, String) Adds or refreshes rows in a specified range in the DataSet to match those in the data source using the DataSet and DataTable names. (Inherited from DbDataAdapter.) SqlDataAdapter Class
QUESTION 31
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Communication Foundation (WCF) Data Services service. You
You add the following code segment. (Line numbers are included for reference only.)

01 var uri = new Uri
02 var ctx = new NorthwindEntities(uri);
03 var categories = from c in ctx.Categories
04 select c;
05 foreach (var category in categories) {
06 PrintCategory(category);
07
08 foreach (var product in category.Products) {
09
10 PrintProduct(product);
11 }
12 }

You need to ensure that the Product data for each Category object is lazy-loaded.

What should you do?

A. Add the following code segment at line 07.ctx.LoadProperty(category, “Products”);
B. Add the following code segment at line 09.ctx.LoadProperty(product, “*”);
C. Add the following code segment at line 07.var strPrdUri = string.Format(“Categories({0})? $expand=Products”, category.CategoryID); var productUri = new Uri (strPrdUri, UriKind.Relative); ctx.Execute<Product>(productUri);
D. Add the following code segment at line 09.var strPrdUri = string.Format(“Products? $filter=CategoryID eq {0}”, category.CategoryID); var productUri = new Uri (strPrdUri, UriKind.Relative); ctx.Execute<Product>(productUri);

Correct Answer: A Explanation
Explanation/Reference:
Explanation:

LoadProperty(Object, String) Explicitly loads an object related to the supplied object by the specified navigation property and using the default merge option.
UriKind Enumeration
RelativeOrAbsolute The kind of the Uri is indeterminate.
Absolute The Uri is an absolute Uri.
Relative The Uri is a relative Uri.

QUESTION 32
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 conceptual schema definition language (CSDL) file contains the following XML fragment.

< EntityType Name=”Contact”>

<Property Name=”EmailPhoneComplexProperty”
Type=”AdventureWorksModel.EmailPhone”
Nullable=”false” />
</EntityType>

<ComplexType Name=”EmailPhone”>
<Property Type=”String” Name=”EmailAddress”
MaxLength=”50″ FixedLength=”false”
Unicode=”true” />
<Property Type=”String” Name=”Phone” MaxLength=”25″
FixedLength=”false” Unicode=”true” />
</ComplexType>
You write the following code segment. (Line numbers are included for reference only.)

01 using (EntityConnection conn = new EntityConnection(“name=AdvWksEntities”))
02 {
03 conn.Open();
04 string esqlQuery = @”SELECT VALUE contacts FROM
05 AdvWksEntities.Contacts AS contacts
06 WHERE contacts.ContactID == 3″;
07 using (EntityCommand cmd = conn.CreateCommand())
08 {
09 cmd.CommandText = esqlQuery;
10 using (EntityDataReader rdr = cmd.ExecuteReader())
11 {
12 while (rdr.Read())
13 {
14
15 }
16 }
17 }
18 conn.Close();
19 }

You need to ensure that the code returns a reference to a ComplexType entity in the model named EmailPhone.
Which code segment should you insert at line 14?
A. int FldIdx = 0; EntityKey key = record.GetValue(FldIdx) as EntityKey;foreach (EntityKeyMember keyMember in key.EntityKeyValues) { return keyMember.Key + ” : ” + keyMember.Value; }
B. IExtendedDataRecord record = rdr[“EmailPhone”]as IExtendedDataRecord; int FldIdx = 0; return record.GetValue(FldIdx);
C. DbDataRecord nestedRecord = rdr[“EmailPhoneComplexProperty”] as DbDataRecord; return nestedRecord;
D. int fieldCount = rdr[“EmailPhone”].DataRecordInfo.FieldMetadata.Count;for (int FldIdx = 0; FldIdx < fieldCount; FldIdx++){rdr.GetName(FldIdx); if (rdr.IsDBNull (FldIdx) == false){return rdr[“EmailPhone”].GetValue(FldIdx).ToString();}}

Correct Answer: C Explanation
Explanation/Reference:
QUESTION 33
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. You create classes by using LINQ to SQL based on the records shown in the exhibit. (Click the Exhibit button.)

You need to create a LINQ query to retrieve a list of objects that contains the OrderID and CustomerID properties. You need to retrieve the total price amount of each Order record.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
A. from details in dataContext.Order_Detailgroup details by details.OrderID into gjoin order in dataContext.Orders on g.Key equals order.OrderID select new {OrderID = order.OrderID, CustomerID = order.CustomerID,TotalAmount = g.Sum(od => od.UnitPrice * od.Quantity)}
B. dataContext.Order_Detail.GroupJoin(dataContext.Orders,d => d.OrderID,o => o.OrderID,(dts, ord) => new {OrderID = dts.OrderID,CustomerID = dts.Order.CustomerID,TotalAmount = dts.UnitPrice * dts.Quantity})
C. from order in dataContext.Orders group order by order.OrderID into gjoin details in dataContext.Order_Detail on g.Key equals details.OrderID select new {OrderID = details.OrderID,CustomerID = details.Order.CustomerID,TotalAmount = details.UnitPrice * details.Quantity}
D. dataContext.Orders.GroupJoin(dataContext.Order_Detail,o => o.OrderID,d => d.OrderID.(ord, dts) => new {OrderID = ord.OrderID,CustomerID = ord.CustomerID,TotalAmount = dts.Sum(od => od.UnitPrice * od.Quantity)})

Correct Answer: AD Explanation
Explanation/Reference:
Explanation:
Alterantive A. This is an Object Query. It looks at the Order Details EntitySet and creating a group g based on OrderID.

*
The group g is then joined with Orders EntitySet based on g.Key = OrderID
*
For each matching records a new dynamic object containing OrderID, CustomerID and TotalAmount is created.
*
The dynamic records are the results returned in an INumerable Object, for later processing Alterantive D. This is an Object Query. The GroupJoin method is
used to join Orders to OrderDetails.
Parameters for GroupJoin:

1.
An Order_Details EntitySet
2.
Order o (from the Orders in the Orders Entity Set, picking up Order_id from both Entity Sets)
3.
Order_ID from the first Order_Details record from the OD EnitySet
4.
Lamda Expression passing ord and dts (ord=o, dts=d) The body of the Lamda Expression is working out the total and Returning a Dynamic object as in A.

QUESTION 34
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 Entity SQL to retrieve data from the database.
You need to enable query plan caching.
Which object should you use?
A. EntityCommand
B. EntityConnection
C. EntityTransaction
D. EntityDataReader

Correct Answer: A Explanation
Explanation/Reference:
Explanation:

Whenever an attempt to execute a query is made, the query pipeline looks up its query plan cache to see whether the exact query is already compiled and
available. If so, it reuses the cached plan rather than building a new one. If a match is not found in the query plan cache, the query is compiled and cached.
A query is identified by its Entity SQL text and parameter collection (names and types). All text comparisons are case-sensitive.
Query plan caching is configurable through the EntityCommand. To enable or disable query plan caching through System.Data.EntityClient.EntityCommand.
EnablePlanCaching, set this property to true or false. Disabling plan caching for individual dynamic queries that are unlikely to be used more then once improves
performance.

You can enable query plan caching through EnablePlanCaching. Query Plan Caching
QUESTION 35
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 database includes a database table named ProductCatalog as shown in the exhibit. (Click the Exhibit button.)

You add the following code segment to query the first row of the ProductCatalog table. (Line numbers are included for reference only.)

01 using (var cnx = new SqlConnection(connString))
02 {
03 var command = cnx.CreateCommand();
04 command.CommandType = CommandType.Text;
05 command.CommandText =”SELECT TOP 1 * FROM dbo.ProductCatalog”;
06 cnx.Open();
07 var reader = command.ExecuteReader();
08 if (reader.Read()) {
09 var id = reader.GetInt32(0);
10
11 reader.Close();
12 }
13 }
You need to read the values for the Weight, Price, and Status columns.

Which code segment should you insert at line 10?

A. var weight = reader.GetDouble(1); var price = reader.GetDecimal(2); var status = reader.GetBoolean(3);
B. var weight = reader. GetDecimal (1); var price = reader. GetFloat (2); var status = reader.GetByte(3);
C. var weight = reader.GetDouble(1); var price = reader.GetFloat(2); var status = reader.GetBoolean(3);
D. var weight = reader.GetFloat(1); var price = reader.GetDouble(2); var status = reader.GetByte(3);

Correct Answer: A Explanation
Explanation/Reference:
QUESTION 36
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application retrieves data from a Microsoft SQL Server 2008
database named AdventureWorks. The AdventureWorks.dbo.ProductDetails table contains a column named ProductImages that uses a varbinary(max) data type.

You write the following code segment. (Line numbers are included for reference only.)

01 SqlDataReader reader =
02 command.ExecuteReader(
03
04 );
05 while (reader.Read())
06 {
07 pubID = reader.GetString(0);
08 stream = new FileStream(
09 …
10 );
11 writer = new BinaryWriter(stream);
12 startIndex = 0;
13 retval = reader.GetBytes(1, startIndex, outByte, 0, bufferSize);
14 while (retval == bufferSize)
15 {
16 …
17 }
18 writer.Write(outByte, 0, (int)retval – 1);
19 writer.Flush();
20 writer.Close();
21 stream.Close();
22 }

You need to ensure that the code supports streaming data from the ProductImages column.

Which code segment should you insert at line 03?

A. CommandBehavior.Default
B. CommandBehavior.KeyInfo
C. CommandBehavior.SingleResult
D. CommandBehavior.SequentialAccess
Correct Answer: D Explanation

Explanation/Reference:
Explanation:
Default
The query may return multiple result sets. Execution of the query may affect the database state. Default sets no CommandBehavior flags, so calling
ExecuteReader(CommandBehavior.Default) is functionally equivalent to calling ExecuteReader(). KeyInfo The query returns column and primary key information.
When KeyInfo is used for command execution, the provider will append extra columns to the result set for existing primary key and timestamp columns.
SingleResult The query returns a single result set.
SequentialAccess Provides a way for the DataReader to handle rows that contain columns with large binary values.
Rather than loading the entire row, SequentialAccess enables the DataReader to load data as a stream. You can then use the GetBytes or GetChars method to
specify a byte location to start the read operation, and a limited buffer size for the data being returned.
CommandBehavior Enumeration
QUESTION 37
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.

The application contains the following XML document.

<bib>
<book title=”TCP/IP Illustrated” year=”1994″>
<author> Author1 </author>
</book>
<book title=”Programming in Unix” year=”1992″>
<author> Author1 </author>
<author> Author2 </author>
<author> Author3 </author>
</book>
<book title=”Data on the Web” year=”2000″>
<author> Author4 </author>
<author> Author3 </author>
</book>
</bib>

You add the following code fragment. (Line numbers are included for reference only.)

01 public IEnumerable<XElement> GetBooks(string xml)
02 {
03 XDocument doc = XDocument.Parse(xml);
04
05 }

You need to return a list of book XML elements that are authored by Author1.

Which code segment should you insert at line 04?

A. return doc.Element(“bib”).Elements().SelectMany(e1 => e1.Elements().Where(e2 => e2 .Equals(new XElement(“author”,” Author1 “))));
B. return doc.Element(“bib”).Elements().SelectMany(e1 => e1.Elements().Where(e2 => (string)e2 == ” Author1 “));
C. return doc.Element(“bib”).Elements().Where(e1 => e1.Elements().Any(e2 => (string)e2 == ” Author1 “));
D. return doc.Element(“bib”).Elements().Where(e1=> e1.Elements().Any(e2 => e2 .Equals(new XElement(“author”,”Author1″))));

Correct Answer: C Explanation
Explanation/Reference:
QUESTION 38
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 following SQL statement to retrieve an instance of a DataSet object named ds:
SELECT CustomerID, CompanyName, ContactName, Address, City FROM dbo.Customers
You need to query the DataSet object to retrieve only the rows where the ContactName field is not NULL.
Which code segment should you use?
A. from row in ds.Tables[0].AsEnumerable()where (string)row[“ContactName”] != nullselect row;
B. from row in ds.Tables[0].AsEnumerable()where row.Field<string>(“ContactName”) != nullselect row;
C. from row in ds.Tables[0].AsEnumerable()where !row.IsNull((string)row[“ContactName”])select row;
D. from row in ds.Tables[0].AsEnumerable()where !Convert.IsDBNull(row.Field<string>(” ContactName “))select row;
Correct Answer: B Explanation

Explanation/Reference:
Explanation:
Field<T>(DataRow, String) Provides strongly-typed access to each of the column values in the specified row. The Field method also supports nullable types.
QUESTION 39
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that will access a WCF data service. The solution contains the projects shown in the following table.

The WCF data service exposes an Entity Framework model.
You need to access the service by using a WCF Data Services client. What should you do in the Application.Client project?
A. Add a reference to the Application.Model project.
B. Add a reference to the Application.Service project.
C. Add a service reference that uses the URL of the WCF data service.
D. Add a Web reference that uses the URL of the WCF data service. Correct Answer: C

Explanation Explanation/Reference:
QUESTION 40
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 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. Correct Answer: D

Explanation Explanation/Reference:
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.
QUESTION 41
You use the Microsoft .NET Framework 4 Entity Framework to develop an application that contains an Entity Data Model for the following database tables.

You need to ensure that the entity that is mapped to the ContentTypeDerived table derives from the entity that is mapped to the ContentTypeBase table.
What should you do?
A. Use a Table-Per-Type mapping method.
B. Use a Table-Per-Hierarchy mapping method.
C. Create a function import for each entity.
D. Create a complex type for each entity.

Correct Answer: A Explanation
Explanation/Reference:
QUESTION 42
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?
A. 1. Generate a MetadataWorkspace and create an ObjectContext for the model. 2. Disable proxy object creation on the ContextOptions of the ObjectContext. 3. Enable lazy loading on the ContextOptions of the ObjectContext.
B. 1. Generate a MetadataWorkspace and create an ObjectContext for the model. 2. Create an ObjectSet for the POCO classes. 3. Disable proxy object creation on the ContextOptions of the ObjectContext.
C. 1. Generate an Entity Data Model for the POCO classes. 2. Create an ObjectSet for the POCO classes. 3. Disable proxy object creation on the ContextOptions of the ObjectContext. 4. Enable lazy loading on the ContextOptions of the ObjectContext.
D. 1. Generate an Entity Data Model for the POCO classes. 2. Create an ObjectSet for the POCO classes. 3. Set Code Generation Strategy on the Entity Data Model to none. 4. Create an ObjectContext for the model.

Correct Answer: D Explanation
Explanation/Reference:
QUESTION 43
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?
A. Add the following code fragment to the .edmx file. <Function Name=”YearsSinceNow” ReturnType=”Edm.Int32″><Parameter Name=”date” Type=”Edm.DateTime” /><DefiningExpression>Year(CurrentDateTime()) – Year(date)</DefiningExpression></Function>Add the following function to the entity class definition. [EdmComplexType(“SchoolModel”, “YearsSinceNow”)]public static int YearsSinceNow(DateTime date){throw new NotSupportedException (“Direct calls are not supported.”);}
B. Add the following code fragment to the .edmx file. <Function Name=”YearsSinceNow” ReturnType=”Edm.Int32″><Parameter Name=”date” Type=”Edm.DateTime” /><DefiningExpression>Year(CurrentDateTime()) – Year(date)</DefiningExpression></Function>Add the following function to the entity class definition. [EdmFunction(“SchoolModel”, “YearsSinceNow”)] public static int YearsSinceNow(DateTime date){throw new NotSupportedException(“Direct calls are not supported.”);}
C. Add the following code fragment to the .edmx file. <Function Name=”YearsSinceNow” ReturnType=”Edm.Int32″><Parameter Name=”date” Type=”Edm.DateTime” /></Function>Add the following function to the entity class definition. [EdmFunction(“SchoolModel”, “YearsSinceNow”)] public static int YearsSinceNow(DateTime date) {return Year(CurrentDateTime() – Year(date)); }
D. Use the Entity Data Model Designer to create a complex property named YearsSinceNow that can be accessed through the LINQ to Entities query at a later time.

Correct Answer: B Explanation
Explanation/Reference:
Explanation:

How to: Call Model-Defined Functions in Queries

QUESTION 44
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?
A. Add the stored procedures in the SSDL file along with a Function attribute. Define a complex type in the CSDL file. Map the stored procedure in the MSL file with a ModificationFunctionElement.
B. Add the stored procedures in the SSDL file along with a Function attribute. Define a complex type in the CSDL file. Map the stored procedure in the MSL file with an AssociationEnd element.
C. Use the edmx designer to import the stored procedures. Derive an entity class from the existing entity as a complex type. Map the stored procedure in the MSL file with an AssociationEnd element.
D. Add the stored procedures in the SSDL file along with a Function attribute. Derive an entity class from the existing entity as a complex type. Map the stored procedure in the MSL file with a ModificationFunctionElement.

Correct Answer: A Explanation
Explanation/Reference:
Explanation:
EndProperty Element (MSL)
QUESTION 45
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to develop an application that uses the Entity Framework.
You need to execute custom logic when an entity is attached to the ObjectContext.
What should you do?
A. Create a partial method named OnStateChanged in the partial class for the entity.
B. Create a partial method named OnAttached in the partial class for the entity.
C. Create an event handler to handle the ObjectStateManagerChanged event.
D. Create an event handler to handle the ObjectMaterialized event.
Correct Answer: C Explanation

Explanation/Reference:
Explanation:
ObjectStateManagerChanged Occurs when entities are added to or removed from the state manager. ObjectMaterialized Occurs when a new entity object is created from data in the data source as part of a query or load operation. ObjectStateManagerChanged Event
ObjectMaterialized Event
QUESTION 46
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?
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.

Correct Answer: A Explanation
Explanation/Reference:
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
QUESTION 47
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?
A. using (NorthwindDataContext dc = new NorthwindDataContext()){dc.ObjectTrackingEnabled = false;var categories = from c in dc.Categoriesselect c;foreach (var category in categories) {Console.WriteLine(“{0} has {1} products”, category.CategoryName, category.Products.Count);}}
B. using (NorthwindDataContext dc = new NorthwindDataContext()) {dc.DeferredLoadingEnabled = false;DataLoadOptions dlOptions = new DataLoadOptions();dlOptions.LoadWith<Category>(c => c.Products);dc.LoadOptions = dlOptions;var categories = from c in dc.Categoriesselect c;foreach (var category in categories){Console.WriteLine(“{0} has {1} products”, category.CategoryName, category.Products.Count);}}
C. using (NorthwindDataContext dc = new NorthwindDataContext()) {dc.DeferredLoadingEnabled = false;var categories = from c in dc.Categoriesselect c;foreach (var category in categories) {Console.WriteLine(“{0} has {1} products”, category.CategoryName, category.Products.Count);}}
D. using (NorthwindDataContext dc = new NorthwindDataContext()){dc.DeferredLoadingEnabled = false;DataLoadOptions dlOptions = new DataLoadOptions();dlOptions.AssociateWith<Category>(c => c.Products);dc.LoadOptions = dlOptions;var categories = from c in dc.Categoriesselect c;foreach (var category in categories){Console.WriteLine(“{0} has {1} products”, category.CategoryName, category.Products.Count);}}

Correct Answer: B Explanation
Explanation/Reference:
Explanation:
DataLoadOptions Class Provides for immediate loading and filtering of related data. DataLoadOptions.LoadWith(LambdaExpression) Retrieves specified data
related to the main target by using a lambda expression.
You can retrieve many objects in one query by using LoadWith. DataLoadOptions.AssociateWith(LambdaExpression) Filters the objects retrieved for a particular
relationship.
Use the AssociateWith method to specify sub-queries to limit the amount of retrieved data.
DataLoadOptions Class

QUESTION 48
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?

A. Add the property in the generated class file, and select Run Custom Tool from the solution menu.
B. Add the property in a partial class named Product in a new source file.
C. Create a complex type with the name of the property in the Entity Framework Designer.
D. Create a function import with the name of the property in the Entity Framework Designer. Correct Answer: B

Explanation Explanation/Reference:
QUESTION 49
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?

A. command.CommandText = “USE [pubs]; exec uspLoginAudit;”; using (SqlConnection connection = new SqlConnection(“Initial Catalog=AdventureWorks; Integrated Security=SSPI;MultipleActiveResultSets=True”)){connection.Open();command.ExecuteNonQuery();}
B. command.CommandText = “exec uspLoginAudit;”;using (SqlConnection connection = new SqlConnection(“Integrated Security=SSPI; Initial Catalog=pubs”)) {connection.Open();command.ExecuteNonQuery();}
C. command.CommandText = “USE [pubs]; exec uspLoginAudit;”;using (SqlConnection connection = new SqlConnection( “Integrated Security=SSPI; Initial Catalog=AdventureWorks”)) {connection.Open();command.ExecuteNonQuery();}
D. command.CommandText = “exec uspLoginAudit;”; using (SqlConnection connection = new SqlConnection(“Integrated Security=SSPI;”)){connection.Open ();command.ExecuteNonQuery();}

Correct Answer: C Explanation
Explanation/Reference:
Explanation:
Working with Multiple Active Result Sets
QUESTION 50
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?
A. Data Source=myServerAddress; Initial Catalog=myDataBase; Integrated Security=SSPI; Persist Security Info=true;
B. Data Source=myServerAddress; Initial Catalog=myDataBase; User Id = myUsername; Password = myPassword; Persist Security Info=false;
C. Data Source=myServerAddress; Initial Catalog=myDataBase; Integrated Security=SSPI; Persist Security Info=false;
D. Data Source=myServerAddress; Initial Catalog=myDataBase; User Id = myUsername; Password = myPassword; Persist Security Info=true;

Correct Answer: C Explanation Explanation/Reference:
Explanation:
Persist Security Info
Default: ‘false’
When set to false or no (strongly recommended), security-sensitive information, such as the password, is not returned as part of the connection if the connection is
open or has ever been in an open state. Resetting the connection string resets all connection string values including the password.
Recognized values are true, false, yes, and no.

QUESTION 51
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?
A. Set DeferredLoadingEnabled to true on the DataContext class.
B. Set DeferredLoadingEnabled to false on the DataContext class.
C. Set ObjectTrackingEnabled to true on the DataContext class.
D. Set ObjectTrackingEnabled to false on the DataContext class.

Correct Answer: D Explanation
Explanation/Reference:
Explanation:
Setting property ObjectTrackingEnabled to false improves performance at retrieval time, because there are fewer items to track. DataContext.ObjectTrackingEnabled Property
QUESTION 52
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. The application contains the following XML document.

< feed >
< title > Products < /title >
< entry >
< title > Entry title 1 < /title >
< author > Author1 < /title >
< content >
< properties >
< description > some description < /description >
< n otes > some notes < /notes >
< comments > some comments < /comments >
< /properties >
< /content >
< /entry >

< /feed >

You plan to add localization features to the application.

You add the following code segment. (Line numbers are included for reference only.)
01 public IEnumerable < XNode > GetTextNodesForLocalization(XDocument doc)
02 {
03
04 return from n in nodes
05 where n.NodeType == XmlNodeType.Text
06 select n;
07 }

You need to ensure that the GetTextNodesForLocalization method returns all the XML text nodes of the document.

Which code segment should you insert at line 03?

A. IEnumerable < XNode > nodes = doc.DescendantNodes();
B. IEnumerable < XNode > nodes = doc.Nodes();
C. IEnumerable < XNode > nodes = doc.Descendants();
D. IEnumerable < XNode > nodes = doc.NodesAfterSelf();

Correct Answer: A Explanation
Explanation/Reference:
Explanation:

DescendantNodes() Returns a collection of the descendant nodes for this document or element, in document order.
Descendants() Returns a collection of the descendant elements for this document or element, in document order.
Nodes() Returns a collection of the child nodes of this element or document, in document order. NodesAfterSelf() Returns a collection of the sibling nodes after
this node, in document order

QUESTION 53
You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application. You deploy a Windows Communication Foundation (WCF) Data Service to a production server. The application is hosted by Internet Information Services (IIS).
After deployment, applications that connect to the service receive the following error message: “The server encountered an error processing the request. See server logs for more details.”
You need to ensure that the actual exception data is provided to client computers.
What should you do?
A. Add the ServiceBehavior attribute to the class that implements the data service.
B. Add the FaultContract attribute to the class that implements the data service.
C. Modify the applications Web.config file. Set the value for the customErrors element to Off.
D. Modify the applications Web.config file. Set the value for the customErrors element to RemoteOnly.
Correct Answer: A Explanation

Explanation/Reference:
Explanation:
Apply the ServiceBehaviorAttribute attribute to a service implementation to specify service-wide execution behavior.
The IncludeExceptionDetailInFaults property specifies whether unhandled exceptions in a service are returned as SOAP faults. This is for debugging purposes
only.
ServiceBehavior Attribute

{
[OperationContract]
int Add(int n1, int n2);
[OperationContract]
int Subtract(int n1, int n2);
[OperationContract]
int Multiply(int n1, int n2);
[OperationContract]
[FaultContract(typeof(MathFault))]
int Divide(int n1, int n2);
}
The FaultContractAttribute attribute indicates that the Divide operation may return a fault of type MathFault. A
fault can be of any type that can be serialized. In this case, the MathFault is a data contract, as follows:
[DataContract(Namespace=
{
private string operation;
private string problemType;
[DataMember]
public string Operation
{
get { return operation; }
set { operation = value; }
}
[DataMember]
public string ProblemType
{
get { return problemType; }
set { problemType = value; }
}
}

QUESTION 54
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.
You need to use a spatial value type as a parameter for your database query.
What should you do?
A. Set the parameters SqlDbType to Udt. Set the parameters UdtTypeName to GEOMETRY.
B. Set the parameters SqlDbType to Binary.
C. Set the parameters SqlDbType to Variant.
D. Set the parameters SqlDbType to Structured. Set the parameters TypeName to GEOMETRY.

Correct Answer: A Explanation
Explanation/Reference:
Explanation:

There are two types of spatial data. The geometry data type supports planar, or Euclidean (flat-earth), data.
The geometry data type conforms to the Open Geospatial Consortium (OGC) Simple Features for SQL Specification version 1.1.0.
In addition, SQL Server supports the geography data type, which stores ellipsoidal (round-earth) data, such as GPS latitude and longitude coordinates.
SqlParameter.UdtTypeName Gets or sets a string that represents a user-defined type as a parameter.
CHAPTER 2 ADO.NET Connected Classes
Lesson 2: Reading and Writing Data
Working with SQL Server User-Defined Types (UDTs) (page 105) Spatial types
QUESTION 55
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 create a DataSet object in the application. You add two DataTable objects named App_Products and App_Categories to the DataSet. You add the following
code segment to populate the DataSet object. (Line numbers are included for reference only.)

01 public void Fill(SqlConnection cnx, DataSet ds) {
02
03 var cmd = cnx.CreateCommand();
04 cmd.CommandText = “SELECT * FROM dbo.Products; ” + “SELECT * FROM dbo.Categories”;
05 var adapter = new SqlDataAdapter(cmd);
06
07 }

You need to ensure that App_Products and App_Categories are populated from the dbo.Products and dbo. Categories database tables. Which code segment
should you insert at line 06?

A. adapter.Fill(ds, “Products”); adapter.Fill(ds, “Categories”);
B. adapter.Fill(ds.Tables[“App_Products”]);adapter.Fill(ds.Tables[“App_Categories”]);
C. adapter.TableMappings.Add(“Table”, “App_Products”);adapter.TableMappings.Add(“Table1”, “App_Categories”);adapter.Fill(ds);
D. adapter.TableMappings.Add(“Products”, “App_Products”);adapter.TableMappings.Add(“Categories”, “App_Categories”);adapter.Fill(ds);
Correct Answer: C Explanation Explanation/Reference:

Explanation:
Table Mapping in ADO.NET
Veritas 70-516 exam is very adapted to the people who are interesting in the information technology domain. If you want to get the higher level, you not only to take part in the Veritas 70-516 exam sample questions in FLYDUMPS, but also other Veritas 70-516 certification. The FLYDUMPS prepares many certifications for people. Find the upgrade versions of Veritas 70-516 exam science, latest Veritas 70-516 questions and Veritas 70-516 pdf exam. With FLYDUMPS Veritas 70-516 exam sample questions, your success is guaranteed. There must be your acquisitive. This will present you with facts that you simply need to get success the exam.

Welcome to download the newest Pass4itsure PGMP dumps: http://www.pass4itsure.com/PGMP.html

ISEB ISEB-ITILF Practice, Prompt Updates ISEB ISEB-ITILF Study Material For Sale