Pass4Testの商品は100%の合格率を保証いたします。Pass4TestはITに対応性研究続けて、高品質で低価格な問題集が開発いたしました。Pass4Testの商品の最大の特徴は20時間だけ育成課程を通して楽々に合格できます。

Pass4Testはきみの貴重な時間を節約するだけでなく、 安心で順調に試験に合格するのを保証します。Pass4Testは専門のIT業界での評判が高くて、あなたがインターネットでPass4Testの部分のMicrosoft 70-516-CSHARP資料を無料でダウンロードして、弊社の正確率を確認してください。弊社の商品が好きなのは弊社のたのしいです。
Pass4Testは毎日24時間オンラインに顧客に対してサービスを提供するアフターサービスはとても良いサイトでございます。最新な情報を1年間に無料にアップデートしております。少ないお金をかかって、一回に合格しましょう。Pass4Testの問題集は最大のお得だね!
試験番号:70-516-CSHARP問題集
試験科目:Microsoft 「TS: Accessing Data with Microsoft .NET Framework 4」
あなたはPass4Testが提供したMicrosoftの70-516-CSHARP認定試験の問題集だけ利用して合格することが問題になりません。ほかの人を超えて業界の中で最大の昇進の機会を得ます。もしあなたはPass4Testの商品がショッピング車に入れて24のインターネットオンライン顧客サービスを提供いたします。問題があったら気軽にお問いください、
Microsoft 70-516-CSHARP認証試験に合格することが簡単ではなくて、Microsoft 70-516-CSHARP証明書は君にとってはIT業界に入るの一つの手づるになるかもしれません。しかし必ずしも大量の時間とエネルギーで復習しなくて、弊社が丹精にできあがった問題集を使って、試験なんて問題ではありません。
購入前にお試し,私たちの試験の質問と回答のいずれかの無料サンプルをダウンロード:http://pdf.pass4test.jp/70-516-CSHARP.pdf
NO.1 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.
The application contains the following code segment.(Line numbers are included for reference only.)
01class DataAccessLayer
02{
03private static string connString;
04
05...
06public static DataTable GetDataTable(string command){
07
08...
09}
10}
You need to define the connection life cycle of the DataAccessLayer class.You also need to ensure that
the application uses the minimum number of connections to the database.
What should you do?
A.Insert the following code segment at line 04.
private static SqlConnection conn = new SqlConnection(connString);
public static void Open(){
?conn.Open();
}
public static void Close(){
conn.Close();
}
B.Insert the following code segment at line 04.
private SqlConnection conn = new SqlConnection(connString);
public void Open(){
conn.Open();
}
public void Close(){
conn.Close();
}
C.Replace line 01 with the following code segment.
class DataAccessLayer : IDisposable
Insert the following code segment to line 04.
private SqlConnection conn = new SqlConnection(connString);
public void Open(){
conn.Open();
}
public void Dispose(){
conn.Close();
}
D.Insert the following code segment at line 07.
using (SqlConnection conn = new SqlConnection(connString)){
conn.Open();
}
Answer: D
Microsoft 70-516-CSHARP認証試験 70-516-CSHARP参考書 70-516-CSHARP
NO.2 The entity data model must be configured to provide a way to call the sp_FindObsolete stored
procedure.The returned data must implement the Descendants property.
In Visual Studio 2010, you open the Add Function Import dialog box from the EDMX diagram and enter
the information shown in the following graphic.
You need to complete the configuration in the dialog box.
What should you do?
A.In the Returns a Collection Of area, click Scalars and then, in the Scalars list, click Int32.
B.In the Returns a Collection Of area, click Scalars and then, in the Scalars list, click string.
C.In the Returns a Collection Of area, click Entities and then, in the Entities list, click Component.
D.Click the Get Column Information button, click Create New Complex Type and then, in the Complex box,
enter Parts.
Answer: C
Microsoft過去問 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP参考書
NO.3 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 use the ADO.NET Entity Framework
to model your entities.You use ADO.NET self-tracking entities.
You need to ensure that the change-tracking information for the self-tracking entities can be used to
update the database.
Which ObjectContext method should you call after changes are made to the entities?
A.Attach
B.Refresh
C.SaveChanges
D.ApplyChanges
Answer: D
Microsoft 70-516-CSHARP認証試験 70-516-CSHARP問題集 70-516-CSHARP認定資格
NO.4 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 define a Category class by writing the following code segment.(Line numbers are included for
reference only.)
01public class Category
02{
03public int CategoryID { get; set; }
04public string CategoryName { get; set; }
05public string Description { get; set; }
06public byte[] Picture { get; set; }
07
08}
You need to add a collection named Products to the Category class.You also need to ensure that the
collection supports deferred loading.
Which code segment should you insert at line 07?
A.public static List<Product> Products { get; set; }
B.public virtual List<Product> Products { get; set; }
C.public abstract List<Product> Products { get; set; }
D.protected List<Product> Products { get; set; }
Answer: B
Microsoft認定資格 70-516-CSHARP 70-516-CSHARP練習問題 70-516-CSHARP過去問
NO.5 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.You
use the ADO.NET Entity Framework to model your entities.The application connects to a Microsoft SQL
Server 2008 database named AdventureWorks by using Windows Authentication.
Information about the required Entity Data Model (EDM) is stored in the following files:
model.csdl
model.ssdl
model.msl
These files are embedded as resources in the MyCompanyData.dll file.
You need to define the connection string that is used by the application.
Which connection string should you add to the app.config file?
A.<add name="AdventureWorksEntities"
connectionString="metadata=res://MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.csdl|
res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.ssdl|
res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.msl;
provider=System.Data.EntityClient;provider connection string='Data Source=localhost;
Initial Catalog=AdventureWorks;Integrated Security=True;multipleactiveresultsets=true'"
providerName="System.Data.SqlClient" />
B.<add name="AdventureWorksEntities"
connectionString="metadata=res://MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.csdl|
res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.ssdl|
res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.msl;
provider=System.Data.SqlClient;provider connection string='Data Source=localhost;
Initial Catalog=AdventureWorks;Integrated Security=True;multipleactiveresultsets=true'"
providerName="System.Data.EntityClient" />
C.<add name="AdventureWorksEntities"
connectionString="metadata=res://MyCompany.Data.model.csdl|
res: //MyCompany.Data.model.ssdl|
res: //MyCompany.Data.model.msl;
provider=System.Data.SqlClient;provider connection string='Data Source=localhost;
Initial Catalog=AdventureWorks;Integrated Security=SSPI;multipleactiveresultsets=true'"
providerName="System.Data.EntityClient" />
D.<add name="AdventureWorksEntities"
connectionString="metadata=res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.csdl|
res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.ssdl|
res: //MyCompany.Data,Culture=neutral,PublicKeyToken=null/model.msl;
provider=System.Data.OleDBClient;provider connection string='Provider=sqloledb;Data
Source=localhost;
Initial Catalog=AdventureWorks;Integrated Security=SSPI;multipleactiveresultsets=true'"
providerName="System.Data.EntityClient" />
Answer: B
Microsoft 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP認定資格
NO.6 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=false;
B.Data Source=myServerAddress; Initial Catalog=myDataBase; Integrated Security=SSPI; Persist
Security Info=true;
C.Data Source=myServerAddress; Initial Catalog=myDataBase; User Id = myUsername; Password =
myPassword; Persist Security Info=false;
D.Data Source=myServerAddress; Initial Catalog=myDataBase; User Id = myUsername; Password =
myPassword; Persist Security Info=true;
Answer: A
Microsoft 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP認証試験
NO.7 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 Data Definition Language (DDL) script of the database contains the following code segment.
CREATE TABLE [Sales].[SalesOrderHeader](
[SalesOrderID] [int] IDENTITY(1,1) NOT NULL,
[BillToAddressID] [int] NOT NULL,
CONSTRAINT [PK_SalesOrderHeader_SalesOrderID]
PRIMARY KEY CLUSTERED ([SalesOrderID] ASC)
)
ALTER TABLE [Sales].[SalesOrderHeader]
WITH CHECK ADD CONSTRAINT [FK_SalesOrderHeader_Address]
FOREIGN KEY([BillToAddressID])
REFERENCES [Person].[Address] ([AddressID])
You create an ADO.NET Entity Framework model.
You need to ensure that the entities of the model correctly map to the DDL of the database.
What should your model contain?
A.
B.
C.
D.
Answer: A
Microsoft 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP
NO.8 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.The
application uses the ADO.NET Entity Framework to manage Plain Old CLR Objects (POCO) entities.
You create a new POCO class.
You need to ensure that the class meets the following requirements:
It can be used by an ObjectContext.
It is enabled for change-tracking proxies.
Which two actions should you perform? (Each correct answer presents part of the solution.Choose two.)
A.Modify each mapped property to contain sealed and protected accessors.
B.Modify each mapped property to contain non-sealed, public, and virtual accessors.
C.Configure the navigation property to return a type that implements the ICollection interface.
D.Configure the navigation property to return a type that implements the IQueryable interface.
E.Configure the navigation property to return a type that implements the IEntityWithRelationships
interface.
Answer: BC
Microsoft認証試験 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP
NO.9 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create an application.
You are creating the data layer of the application.
You write the following code segment.(Line numbers are included for reference only.)
01public static SqlDataReader GetDataReader(string sql){
02SqlDataReader dr = null;
03
04return dr;
05}
You need to ensure that the following requirements are met:
The SqlDataReader returned by the GetDataReader method can be used to retrieve rows from the
database.
SQL connections opened within the GetDataReader method will close when the SqlDataReader is closed.
Which code segment should you insert at line 03?
A.using (SqlConnection cnn = new SqlConnection(strCnn)) {
try {
SqlCommand cmd = new SqlCommand(sql, cnn);
cnn.Open();
dr = cmd.ExecuteReader();
}
catch {
throw;
}
}
B.SqlConnection cnn = new SqlConnection(strCnn);
SqlCommand cmd = new SqlCommand(sql, cnn);
cnn.Open();
try {
dr = cmd.ExecuteReader();
}
finally {
cnn.Close();
}
C.SqlConnection cnn = new SqlConnection(strCnn);
SqlCommand cmd = new SqlCommand(sql, cnn);
cnn.Open();
try {
dr = cmd.ExecuteReader();
cnn.Close();
}
catch {
throw;
}
D.SqlConnection cnn = new SqlConnection(strCnn);
SqlCommand cmd = new SqlCommand(sql, cnn);
cnn.Open();
try {
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
}
catch {
cnn.Close();
throw;
}
Answer: D
Microsoft練習問題 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP練習問題
NO.10 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Microsoft ASP.NET
application.
You want to connect the application to a Microsoft SQL Server Express 2008 database named
MyDatabase.The primary database file is named MyDatabase.mdf and it is stored in the App_Data folder.
You need to define the connection string.
Which connection string should you add to the Web.config file?
A.Data Source=localhost; Initial Catalog=MyDataBase; Integrated Security=SSPI; User Instance=True
B.Data Source=.\SQLEXPRESS; Initial Catalog=MyDataBase; Integrated Security=True; User
Instance=True
C.Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\MyDatabase.mdf; Integrated
Security=True; User Instance=True
D.Data Source=SQLEXPRESS; AttachDbFilename=|DataDirectory|\App_Data\MyDatabase.mdf;
Integrated Security=SSPI; User Instance=True
Answer: C
Microsoft問題集 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP問題集 70-516-CSHARP参考書
NO.11 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.
Answer: A
Microsoft 70-516-CSHARP練習問題 70-516-CSHARP練習問題 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP
NO.12 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.Categories
select 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.Categories
select 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.Categories
select 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.Categories
select c;
foreach (var category in categories)
{
Console.WriteLine("{0} has {1} products", category.CategoryName, category.Products.Count);
}
}
Answer: B
Microsoft過去問 70-516-CSHARP 70-516-CSHARP問題集 70-516-CSHARP
NO.13 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 of the ADO.NET Entity
Framework to retrieve data from the database.
You need to define a custom function in the conceptual model.You also need to ensure that the function
calculates a value based on properties of the object.
Which two XML element types should you use? (Each correct answer presents part of the
solution.Choose two.)
A.Function
B.FunctionImport
C.Dependent
D.Association
E.DefiningExpression
Answer: AE
Microsoft認証試験 70-516-CSHARP 70-516-CSHARP
NO.14 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 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
Microsoft認定資格 70-516-CSHARP 70-516-CSHARP認定資格
NO.15 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 to create a Windows Forms
application.
You plan to deploy the application to several shared client computers.
You write the following code segment.(Line numbers are included for reference only.)
01Configuration config = ConfigurationManager.OpenExeConfiguration(exeConfigName);
02
03config.Save();
04...
You need to encrypt the connection string stored in the .config file.
Which code segment should you insert at line 02?
A.ConnectionStringsSection section =
config.GetSection("connectionString") as ConnectionStringsSection;
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
B.ConnectionStringsSection section =
config.GetSection("connectionStrings") as ConnectionStringsSection;
section.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
C.ConnectionStringsSection section =
config.GetSection("connectionString") as ConnectionStringsSection;
section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
D.ConnectionStringsSection section =
config.GetSection("connectionStrings") as ConnectionStringsSection;
section.SectionInformation.ProtectSection("RsaProtectedConfigurationProvider");
Answer: D
Microsoft 70-516-CSHARP認定試験 70-516-CSHARP 70-516-CSHARP
NO.16 The Entity Data Model file (.edmx file) must be updated to support inheritance mapping for Products
and Components.
You need to add the following code to the \Model\Model.edmx file:
the code in line EX243 that maps the Product type
the code in line EX250 that maps the Component type
What should you do?
A.Insert the following code at line EX243:
<Condition ColumnName="ProductType" IsNull="true" />
Insert the following code at line EX250:
<Condition ColumnName="PartType" IsNull="true" />
B.Insert the following code at line EX243:
<Condition ColumnName="ProductType" IsNull="true" />
Insert the following code at line at EX250:
<Condition ColumnName="PartType" IsNull="true" />
C.Insert the following code at line EX243:
<Condition ColumnName="ProductType" IsNull="false" />
Insert the following code at line at EX250:
<Condition ColumnName="PartType" IsNull="false" />
D.Insert the following code at line EX243:
<Condition ColumnName="ProductType" IsNull="false" />
Insert the following code at line at EX250:
<Condition ColumnName="PartType" IsNull="true" />
Answer: C
Microsoft問題集 70-516-CSHARP練習問題 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP認定証 70-516-CSHARP参考書
NO.17 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 ObjectTrackingEnabled to true on the DataContext class.
B.Set ObjectTrackingEnabled to false on the DataContext class.
C.Set DeferredLoadingEnabled to true on the DataContext class.
D.Set DeferredLoadingEnabled to false on the DataContext class.
Answer: B
Microsoft過去問 70-516-CSHARP認定試験 70-516-CSHARP 70-516-CSHARP認定資格
NO.18 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.
Answer: A
Microsoft 70-516-CSHARP問題集 70-516-CSHARP練習問題 70-516-CSHARP認定試験 70-516-CSHARP 70-516-CSHARP
NO.19 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 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.(Click the Exhibit button.)
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
Microsoft 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP 70-516-CSHARP認定証 70-516-CSHARP
NO.20 You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4 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
Microsoft練習問題 70-516-CSHARP 70-516-CSHARP過去問 70-516-CSHARP認定資格 70-516-CSHARP参考書