TS: Accessing Data using Microsoft .NET Framework 4 70-516 Test
Exam Name: Accessing Data together with Microsoft .NET Framework four Exam Type: Microsoft Exam Code: 70-516 Total Questions: 87
Question: 1You use Microsoft Visual Studio the year 2010 and Microsoft .NET Framework 4 that will develop an application.The program makes use of the ADO.NET Entity Framework that will model entities. You establish a new Categoryclass simply by writing this value segment. (Line phone numbers usually are listed intended for referrals only.)public class Category{public int CategoryID { get; set; }public string CategoryName { get; set; }public string Description { get; set; }public byte[] Picture { get; set; }}You have to add your collection known as Products on the Category class. You also have to ensure thatthe selection can handle deferred loading.Which value segment when you place with series 07?
A. Public static number items { get; set; }B. Public virtual checklist products { get; set; }C. Public abstract list items { get; set; }D. Protected listing items { get; set; }
Answer: B
Question: 2You use Microsoft Visual Studio 2010 and Microsoft .NET Framework some to generate a WindowsForms application.You intend to deploy the approval that will several discussed client computers.You produce this particular signal segment. (Line quantities are incorporated with regard to benchmark only.)01Configuration config = ConfigurationManager.OpenExeConfiguration(exeConfigName);0203config.Save();04...You need to help encrypt the anchor text string stored inside .config file.Which computer code segment if you insert at range 02?
A. Connectionstringssection area = config.getsection("connectionstring") because connectionstringssection; section.sectioninformation.protectsection("dataprotectionconfigurationprovider");B. Connectionstringssection portion = config.getsection("connectionstrings") as connectionstringssection; section.sectioninformation.protectsection("dataprotectionconfigurationprovider");C. Connectionstringssection section = config.getsection("connectionstring") as connectionstringssection; section.sectioninformation.protectsection("rsaprotectedconfigurationprovider");D. Connectionstringssection sections = config.getsection("connectionstrings") because connectionstringssection; section.sectioninformation.protectsection("rsaprotectedconfigurationprovider");
Answer: D
Question: 3You work with Microsoft Visual Studio the new year and Microsoft .NET Framework 4 to make a MicrosoftWindows Forms application.You prefer to deploy the necessary paperwork for you to various shared purchaser computers.You write the examples below value segment. (Line figures are usually incorporated for benchmark only.)
Page a single involving 36 Exam Name: Accessing Data by using Microsoft .NET Framework some Exam Type: Microsoft Exam Code: 70-516 Total Questions: 87
01?Dim config As Configuration =ConfigurationManager.OpenExeConfiguration(exeConfigName)0203config.Save()04...You have to encrypt the connection chain stored within the .config file.Which code section when you insert at line 02?
A. Dim section since connectionstringssection = trycast(config.getsection("connectionstring"), connectionstringssection) section.sectioninformation.protectsection("dataprotectionconfigurationprovider")B. Dim section while connectionstringssection = trycast(config.getsection("connectionstrings"), connectionstringssection) section.sectioninformation.protectsection("dataprotectionconfigurationprovider")C. Dim sections since connectionstringssection = trycast(config.getsection("connectionstring"), connectionstringssection) section.sectioninformation.protectsection("rsaprotectedconfigurationprovider")D. Dim sections since connectionstringssection = trycast(config.getsection("connectionstrings"), connectionstringssection) section.sectioninformation.protectsection("RsaProtectedConfigurationProvider")
Answer: D
Question: 4You apply Microsoft Visual Studio the year of 2010 and also Microsoft .NET Framework 4 to build an application.The job application connects to your Microsoft SQL Server database. The application employs theADO.NETEntity Framework to help model entities.The data source comprises materials dependant on this exhibit. (Click the Exhibit button.)The software includes the next code segment. (Line numbers are involved to get referenceonly.)01using (AdventureWorksEntities context = innovative AdventureWorksEntities()){0203foreach (SalesOrderHeader order in customer.SalesOrderHeader){04Console.WriteLine(String.Format("Order: {0} ", order.SalesOrderNumber));05foreach (SalesOrderDetail piece around order.SalesOrderDetail){06Console.WriteLine(String.Format("Quantity: {0} ", item.Quantity));07Console.WriteLine(String.Format("Product: {0} ", item.Product.Name));08}09}10}You desire to listing every one of the assignments for your specified customer.You will need to ensure your variety contains the next fields:"Order number"Quantity of products"Product nameWhich computer code section if you insert at collection 02?
A. Contact client = context.contact.where("it.contactid = @customerid", brand-new objectparameter("customerid", customerid)).first();B. Contact customer = context.contact.where("it.contactid = @customerid", innovative objectparameter("customerid", customerid)).first();C. Context.contextoptions.lazyloadingenabled = true; Contact customer = (from get in touch with in context.contact include("salesorderheader.salesorderdetail")
Page a couple of associated with 36 Exam Name: Accessing Data together with Microsoft .NET Framework four Exam Type: Microsoft Exam Code: 70-516 Total Questions: 87
Select conatct). Firstordefault();D. Contact client = (from call throughout context.contact include("salesorderheader") Select conatct). Firstordefault();
Answer: B
Question: 5You use Microsoft Visual Studio 2010 along with Microsoft .NET Framework 4 to make a strong application.You use the ADO.NET Entity Framework in order to model entities.You prepare these signal segment. (Line amounts are integrated intended for benchmark only.)01AdventureWorksEntities context = New AdventureWorksEntities (02/AdventureWorks.svc03);0405var queen = from c in context.Customers06where c.City == "London"07orderby c.CompanyName08select c;You should make certain that the applying fits the following requirements:"Compares the current valuations associated with unmodified components along with ideals made a comeback in the records source."Marks the property while modified should the houses will not be the same.Which signal message should you embed at tier 04?
A. Context.mergeoption = mergeoption.appendonly;B. Context.mergeoption = mergeoption.preservechanges;C. Context.mergeoption = mergeoption.overwritechanges;D. Context.mergeoption = mergeoption.notracking;
Answer: B
Question: 6You use Microsoft Visual Studio the year 2010 plus Microsoft .NET Framework four to produce a strong application.You utilize the actual ADO.NET Entity Framework for you to product entities.You produce this code segment. (Line amounts are generally incorporated with regard to benchmark only.)01Dim framework As New AdventureWorksEntities("/AdventureWorks.svc")0203Dim queen As var = From c In context.Customers _04Where c.City ="London" _05Order By c.CompanyName _06Select cYou must guarantee that the approval accommodates the next requirements:"Compares the current beliefs with unmodified properties having values returned on the data source."Marks the property as modified if your houses are certainly not this same.Which value message if you ever place during tier 02?
A. Context.mergeoption = mergeoption.appendonlyB. Context.mergeoption = mergeoption.preservechangesC. Context.mergeoption = mergeoption.overwritechangesD. Context.mergeoption = mergeoption.notracking
Answer: B
Question: 7You use Microsoft Visual Studio the new year and also Microsoft .NET Framework four to generate a strong application.You create a savings fund ADO.NET Entity Framework to help type entities.
Page 3 regarding 36 Exam Name: Accessing Data along with Microsoft .NET Framework several Exam Type: Microsoft Exam Code: 70-516 Total Questions: 87
You write this particular value segment. (Line phone numbers will be listed for benchmark only.)01public part class SalesOrderDetail : EntityObject02{03partial void OnOrderQtyChanging(short value)04{0506{07...08}09}10}You should find regardless of whether that item includes a appropriate ObjectStateEntry instance.Which value section if you ever insert at collection 05?
A. If (this.entitystate != entitystate.Detached)B. If (this.entitystate != entitystate.Unchanged)C. If (this.entitystate != entitystate.Modified)D. If (this.entitystate != entitystate.Added)
Answer: D
Question: 8You work with Microsoft Visual Studio 2010 plus Microsoft .NET Framework 4 to set-up an application.You utilize ADO.NET Entity Framework that will model entities.You write the following rule segment. (Line volumes are included with regard to reference point only.)01Public Partial Class SalesOrderDetail02Inherits EntityObject03Partial Sub OnOrderQtyChanging(value As Short)0405End Sub06End ClassYou have to discover no matter whether your item includes a valid ObjectStateEntry instance.Which signal segment if you insert at tier 04?
A. If me.entitystate entitystate.detached then ending ifB. If me.entitystate entitystate.unchanged and then conclude ifC. If me.entitystate entitystate.modified and then end ifD. If me.entitystate entitystate.added then ending if
Answer: D
Question: 9You apply Microsoft Visual Studio 2010, Microsoft Sync Framework, and also Microsoft .NETFramework 4 to set-up an application. You include a ServerSyncProvider powering some sort of MicrosoftSQL Server database. The databases is hosted using a Web server. Users will make use of the Internet toaccess your Customer database as a result of the ServerSyncProvider.You create the next signal segment. (Line phone numbers tend to be included to get reference point only.)01SyncTable customerSyncTable = innovative SyncTable("Customer");02customerSyncTable.CreationOption = TableCreationOption.UploadExistingOrCreateNewTable;0304customerSyncTable.SyncGroup = customerSyncGroup;05 this.Configuration.SyncTables.Add(customerSyncTable);You need to make certain the applying complies with the examples below requirements:"Users can certainly modify data in the area in addition to collect variations in the server."Only changed rows are taken during synchronization.
Page four of 36 Exam Name: Accessing Data using Microsoft .NET Framework some Exam Type: Microsoft Exam Code: 70-516 Total Questions: 87
Which computer code segment when you insert during series 03?
A. Customersynctable.syncdirection = syncdirection.downloadonly;B. Customersynctable.syncdirection = syncdirection.snapshot;C. Customersynctable.syncdirection = syncdirection.bidirectional;D. Customersynctable.syncdirection = syncdirection.uploadonly;
Answer: C
Question: 10You utilize Microsoft Visual Studio 2010, Microsoft Sync Framework, as well as Microsoft .NETFramework 4 to generate an application. You have got a ServerSyncProvider associated with your MicrosoftSQL Server database. The repository will be hosted using a Web server. Users will certainly use the Internet toaccess that Customer database throughout the ServerSyncProvider.You write the examples below value segment. (Line numbers are listed to get reference only.)01Dim customerSyncTable As New SyncTable("Customer")02customerSyncTable.CreationOption = TableCreationOption.UploadExistingOrCreateNewTable0304customerSyncTable.SyncGroup = customerSyncGroup05Me.Configuration.SyncTables.Add(customerSyncTable)You ought to ensure that the necessary paperwork fits your adhering to requirements:"Users can modify data in your neighborhood as well as be given changes in the server."Only changed rows are generally transferred while in synchronization.Which code message in case yo u insert at line 03?
A. Customersynctable.syncdirection = syncdirection.downloadonlyB. Customersynctable.syncdirection = syncdirection.snapshotC. Customersynctable.syncdirection = syncdirection.bidirectionalD. Customersynctable.syncdirection = syncdirection.uploadonly
Answer: C
Question: 11You apply Microsoft Visual Studio the new year and Microsoft .NET Framework 4 to create a WindowsCommunication Foundation (WCF) Data Services service. The service attaches to a MicrosoftSQL Server 2008 database. The provider is usually hosted by an Internet Information Services (IIS) 6.0Web server. The software works effectively within the growth environment. However, whenyou connect towards service within the output server, seeking to help update as well as erase an entityresults with a great error. You need to always might up-date along with rub out entities on the productionserver. What when you do?
A. Add the actual pursuing line of rule for the InitializeService procedure for this service. Config.SetEntitySetAccessRule ("*",EntitySetRights.WriteDelete | EntitySetRights.WriteInsert);B. Add the examples below line of program code to the InitializeService technique of the service. Config.SetEntitySetAccessRule ("*",EntitySetRights.WriteDelete | EntitySetRights.WriteMerge);C. Configure IIS allowing the PUT and also DELETE verbs for any .svc Application Extension.D. Configure IIS to permit the POST and also DELETE verbs to the .svc Application Extension.
Answer: C
Question: 12You apply Microsoft Visual Studio 2010 and beyond along with Microsoft .NET Framework four to make a WindowsCommunication Foundation (WCF) Data Services service. The company connects into a MicrosoftSQL Server 2008 database. The company is usually hosted by means of an Internet Information Services (IIS) 6.0Web server. The job application is effective properly inside that progress environment. However, when
Page 5 of 36
Original Resource :
Visit 70-516 Link : 70-516 Download PDF Link : 70-516
No comments:
Post a Comment