网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

YouareimplementinganASP.NETapplicationthatusesLINQtoEntitiestoaccessandupdatethedatabase.TheapplicationincludesthefollowingmethodtoupdateadetachedentityoftypePerson.YouneedtoimplementtheUpdatePersonmethodtoupdatethedatabaserowthatcorrespondstothepersonToEditobject.Whichcodesegmentshouldyouuse?()

A._entities.People.Attach(personToEdit);_entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Modified);_entities.SaveChanges();

B._entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Added);_entities.SaveChanges();

C._entities.People.ApplyCurrentValues(personToEdit);_entities.SaveChanges();

D._entities.People.Attach(newPerson(){Id=personToEdit.Id});_entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Modified);_entities.SaveChanges();


参考答案

更多 “ YouareimplementinganASP.NETapplicationthatusesLINQtoEntitiestoaccessandupdatethedatabase.TheapplicationincludesthefollowingmethodtoupdateadetachedentityoftypePerson.YouneedtoimplementtheUpdatePersonmethodtoupdatethedatabaserowthatcorrespondstothepersonToEditobject.Whichcodesegmentshouldyouuse?()A._entities.People.Attach(personToEdit);_entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Modified);_entities.SaveChanges();B._entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Added);_entities.SaveChanges();C._entities.People.ApplyCurrentValues(personToEdit);_entities.SaveChanges();D._entities.People.Attach(newPerson(){Id=personToEdit.Id});_entities.ObjectStateManager.ChangeObjectState(personToEdit,EntityState.Modified);_entities.SaveChanges(); ” 相关考题
考题 ()通过反复操作使某些动作、技能、知识经验达到纯熟和正确反应的教学方法。 A、讲授法B、提问法C、练习法D、观察法

考题 随着听觉的发展,婴幼儿的听觉阈限值逐渐降低,7~12个月的婴幼儿的听觉阈限值可降至()。 A、15~30分贝B、25~40分贝C、30~45分贝D、40~50分贝

考题 模拟井口信号测试不出来,不影响正式放炮。() 此题为判断题(对,错)。

考题 《电业安全工作规程》规定,接地线截面应符合短路电流的要求,但不得小于()2mm。 A、2.5B、4C、25D、40

考题 属于R16版本关键特性的是() A.TSNB.HSUPAC.NR-UD.MIMO

考题 Youneedtoensurethatolddataandcurrentdatacanbequeriedaccordingtothebusinessrequirements.Whatshouldyoudo?() A.Specifyaviewbasedonthearchivaldatatableandcurrentdatatables.B.Specifythatthedatamustbequeriedbyusingastoredprocedure.C.Specifythatboththearchivaldatatableandthecurrentdatatablesmusthaveindexescreatedonthesamecolumns.D.SpecifythataSQLServerAgentjobmustbeusedtocopycurrentdataintothearchivaldatatableeachnight.