单项选择题
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(new Person() { Id = personToEdit.Id });_entities.ObjectStateManager.ChangeObjectState(personToEdit, EntityState.Modified);_entities.SaveChanges();
单项选择题 You are implementing an ASP.NET page. Client-side script requires data. Your application includes a class named Person with a Name property of type string. The code-behind file of the page includes the following code segment. You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the people list. Which code segment should you use?()
单项选择题 You are implementing an ASP.NET page. You add and configure the following ObjectDataSource. The page will be called with a query string field named pid. You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductId method. What should you do? ()
单项选择题 YouareimplementinganASP.NETpage.ThepageincludesamethodnamedGetCustomerOrderDataSetthatreturnsaDataSet.TheDataSetincludesaDataTablenamedCustomerDetailsTableandaDataTablenamedOrderDetailsTable.YouneedtodisplaythedatainOrderDetailsTableinaDetailsViewcontrolnameddtlView.Whichcodesegmentshouldyouuse?()