考試代碼: 70-516
考試名稱: TS:Accessing Data with Microsoft .NET
研發團隊致力於國際上最新的各種IT認證,根據最新考試中心截屏所得原始題庫,IT培訓中心和考試中心IT工程師和IT認證專家精心整理製作完成各種IT認證題庫;我們密切跟蹤IT認證的最新動態和考試變化,及時提供最新的試題升級,覆蓋率100%以上,保證您一次通過認證考試。
我們如何保持100%通過率的產品?
我們在題庫致力於客戶的成功。我們的產品出品極為謹慎和專業。我們利用來自世界各地的業界領先的組織專業人員隊伍的經驗和知識。
'客戶的成功就是我們的成功'
70-516 考試是 MicroSoft 公司的 TS:Accessing Data with Microsoft .NET 認證考試官方代號,CramBible的 70-516 權威全真題庫是 MicroSoft 認證廠商的授權產品,絕對保證第一次參加 70-516 考試的考生即可順利通過,否則將全額退款!保證您的利益不受到任何的損失。
CramBible確保您的成功,否則全額退款!
TS:Accessing Data with Microsoft .NET 認證作為全球IT領域專家 MicroSoft 熱門認證之一,是許多大中IT企業選擇人才標準的必要條件。 如果您正在準備 70-516 考試,CramBible是您成功的最佳夥伴;最新70-516權威全真考題題庫,幫助您一次通過MicroSoft認證考試。
根據70-516考試的變化動態更新,所有購買CramBible 70-516認證考題的客戶都將得到90天的免費升級服務,保證了對70-516考試題庫的完整覆蓋。
總結:
1)基本上有6個步驟,您應該遵循自己的方式來獲得認證,即:
2)決定哪個認證適合您 - 獲取認證概述
3 瞭解具體的細節 - 查看具體認證要求的經驗
4)選擇考試夥伴 - 選擇具有10年歷史的認證CramBible,由資深IT工程師和IT認證專家編寫的PDF格式考試資料。
5)複習考試資料 - 認真地複習我們的學習指南。
6)註冊並參加您所需的考試 - 您可以登記PROMETRIC或Pearson VUE的考試中心。
7)我們的的客戶都將得到90天的免費升級服務,保證了對70-516考試題庫的完整覆蓋。
我如何用你們的產品通過考試?
CramBible產品足以通過考試。 我們建議學員學習CramBible7天時間,將幫助您評估您的實際考試前的準備。
。
如何下載產品?
產品可以下載很容易從會員的帳戶,登錄後點擊訂購代碼或“查看”按鈕,開始下載。
產品是什麼格式的?
Adobe Acrobat PDF 文件.您下載的檔為RAR壓縮格式. 請訪問Winrar tool 3.0 plus version 解壓縮檔後用Adobe Acrobat reader閱讀
忘記密碼?
請訪問找回密碼.
輸入您的用戶名,我們會向您發送一封含有密碼的電子郵件.
我怎樣才能得到優惠?
如果您購買的是3個或3個以上的產品,請發電子郵件到 sales@crambible.com,將為您提供提供一個優惠的價格。
如果我失敗了怎麼辦?
不要擔心失敗;為您提供沒有通過考試的退款保證。 你無法通過相應的考試,可以要求退款的保證。點擊這裡更多細節。
需要幫助?
您可以隨時與客戶支援聯繫
線上諮詢,點擊進入每天9:00-18:00 |
This webdemo is just a demo data, only for reference and learning, there is no other purposes.
QUESTION NO:1
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 returns 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;
For each (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 dIOptions = new DataLoadOptions();
dIOptions.LoadWith (c => c.Products); dc.LoadOptions = dIOptions;
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 dIOptions = new DataLoadOptionsQ;
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 dIOptions = new Datal_oadOptions();
dIOptions.AssociateWith (c => c.Products);
dc.LoadOptions = dIOptions;
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
QUESTION NO:2
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 returns
the list of categories and the list of products. Which code
segment should you use?
A. Using dc As New NorthwindDataContext()
dc.ObjectTrackingEnabled = False
Dim categories As var = From c In dc.Categories _
Select c
For Each category As var In categories
Console.WriteLine("{0} has {1} products", category.CategoryName,
category.Products.Count) Next
End Using
B. Using dc As New NorthwindDataContext()
dc.DeferredLoadingEnabled = False
Dim dIOptions As New DataLoadOptions()
dlOptions.LoadWith(Of CategoryXFunction(c As )
c.Products) dc.LoadOptions = dIOptions
Dim categories As var = From c In dc.Categories _ Select c
For Each category As var In categories
Console.WriteLine("{0} has {1} products",
category.CategoryName, category.Products.Count) Next
End Using
C. Using dc As New NorthwindDataContext()
dc.DefferredLoadingEnabled = False
Dim categories As var = From c In dc.Categories _
Select c
For Each category As var In categories
Console.WriteLine("{0} has {1} products",
category.CategoryName, category.Products.Count) Next
End Using
D. Using dc As New NorthwindDataContext()
dc.DeferredLoadingEnabled = False
Dim dIOptions As New Datal_oadOptions()
dlOptions.AssociateWith(Of Category)(Function(c As )
c.Products) dc.LoadOptions = dIOptions
Dim categories As var = From c In dc.Categories _
Select c
For Each category As var In categories
Console.Writel_ine("{0} has {1} products",
category.CategoryName, category.Products.Count) Next
End Using
Answer:B
QUESTION NO:3
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.)
public class Category
{
public int CategorylD {get; set;}
public string CategoryName {get; set;}
public string Description {get; set;}
public byteQ Picture {get; set;}
}
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 Products {get; set;}
B. public virtual List Products {get; set;}
C. public abstract List Products {get; set;}
D. protected List Products {get; set;}
Answer:B
QUESTION 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.)
Public Class Category
Public Property CategorylD() As Integer
Get
End Get
Set
End Set
End Property
Public Property CategoryName() As String
Get
End Get
Set
End Set
End Property
Public Property Description() As String
Get
End Get
Set
End Set
End Property Public Property Picture() As Byte()
Get
End Get
Set
End Set
End Property
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 25?
A. Public Shared Property Products() As List(Of Product) Get
End Get
Set
End Set End Property
B. Public Overridable Property Products() As List(Of Product) Get
End Get
Set
End Set End Property
C. Public MustOverride Property Products() As List(Of Product)
D. Protected Property Products() As List(Of Product) Get
End Get
Set
End Set
End Property
Answer:B
QUESTION NO:5
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.
Year(CurrentDateTimeO) - Year(date)
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.
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.
Answer:B
QUESTION NO:6
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.
Year(CurrentDateTime()) - Year(date)
Add the following function to the entity class definition.
_
Public Shared Function YearsSinceNow([date] As DateTime) As
Integer Throw New NotSupportedException
("Direct calls are not supported")
End Function
B. Add the following code fragment to the .edmx file.
Year(CurrentDateTime()) - Year(date)
Add the following function to the entity class definition.
_
Public Shared Function YearsSinceNow([date]As DateTime) As
Integer Throw New NotSupportedException("Direct calls are not supported.")
End Function
C. Add the following code fragment to the edmx file.
Add the following function to the entity class definition.
_
Public Shared Function YearsSinceNow([date] As DateTime)
As Integer Return Year(CurrentDateTime() - Year([date]))
End Function
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.
Answer: B
QUESTION NO:7
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(lsReference = true)] attribute to the entities.
D. Apply the [DataContract(lsReference = false)] attribute to the entities.
Answer:C
QUESTION 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 lEntityWithRelationships interface.
Answer:BC
QUESTION NO:9
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.
Answer: D
QUESTION NO: 10
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](
[SalesOrderlD] [int] IDENTITY(1,1) NOT NULL,
[BillToAddressID] [int] NOT NULL,
... CONSTRAINT [PK_SalesOrderHeader_SalesOrderlD]
PRIMARY KEY CLUSTERED ([SalesOrderlD] ASC)
) ALTER TABLE [Sales].[SalesOrderHeader]
WITH CHECK ADD CONSTRAINT [FK_SalesOrderHeader_Address]
FOREIGN KEY([BillToAddresslD])
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?
Answer: The First pictures
Know what your next step is on the Related certification path.
Other promising certifications to advance and enhance your certification