Sharepoint学习笔记—习题系列--70-573习题解析 -(Q127-Q130)
Question 127
You create a custom list named Products.
You need to perform a Representational State Transfer (REST) query that returns the first product in the list.
Which URL should you use?
A. http://intranet/_vti_bin/ListData.svc/Products(1)
B. http://intranet/_vti_bin/ListData.svc/Products $filter=1
C. http://intranet/Lists/Products/AllItems.aspx contents=1
D. http://intranet/Lists/Products/ListData.svc $expand=1
解析:
本题是想要返回列表中的第一条记录(ID值为1)。
在Question126中我们已经看了关于REST的基本知识点,下面直接分析各选项:
选项A. http://intranet/_vti_bin/ListData.svc/Products(1) 获取Product列表中ID值为1的Item.
选项B. http://intranet/_vti_bin/ListData.svc/Products $filter=1 此用法不对,一般语法 是/_vti_bin/ListData.svc/ListName?$filter=COLUMN1 eq 'VALUE11’ 即通过某列的值进行过滤查找。
选项C. http://intranet/Lists/Products/AllItems.aspx contents=1 这明显不是REST的表达
选项D. http://intranet/Lists/Products/ListData.svc $expand=1此用法不对,Expand的作用类似于JOIN,例如:如果要返回两个List(Building与 Rooms)的Items,则使用$expand 扩展:/_vti_bin/ListData.svc/Building?$expand=Rooms
所以本题目正确选项应该是A
参考:
http://msdn.microsoft.com/en-us/library/ff798339.aspx
Question 128
You create two custom lists named Offices and Rooms.
Rooms has the following columns:
Title
Capacity
Equipment
Offices has the following columns:
Title
Rooms (a lookup to the Title column in the Rooms list)
Rooms: Capacity
Rooms: Equipment
You need to perform a Representational State Transfer (REST) query that returns a list of all the offices that have rooms with a capacity of 10. The query results must include the room titles and the equipment in each room.
Which URL should you choose?
A. /_vti_bin/ListData.svc/Offices $expand=Rooms&$filter=Rooms/Capacity eq 10
B. /_vti_bin/ListData.svc/Offices &$filter=Rooms/Capacity eq 10
C. /_vti_bin/ListData.svc/Rooms $expand=Offices&$filter=Rooms/Capacity eq 10
D. /_vti_bin/ListData.svc/Rooms &$filter=Offices/Capacity eq 10
解析:
本题涉及到两列表的连接,所以必然要用到Expand方法。所以直接可以排除选项B,D。
又根据题意:需要返回所有拥有接客量为10的房间的Office记录,即:是Rooms跟Office连接,Office是主表,Rooms是从表,返回Office列表项记录,Expand之后跟的应该是从表,所以选项A为答案。
所以本题目正确选项应该是A
参考:
http://msdn.microsoft.com/en-us/library/ff798339.aspx
Question 129
You need to create a Microsoft .NET Framework console application that queries a list by using the SharePoint client object model.
Which two assemblies should you reference? (Each correct answer presents part of the solution. Choose two.)
A. Microsoft.Office.Sharepoint.ClientExtensions.dll
B. Microsoft.SharePoint.Client.dll
C. Microsoft.SharePoint.Client.Runtime.dll
D. Microsoft.SharePoint.Client.Silverlight.Runtime.dll
解析:
本题是想建立一个基于.NET Framework的控制台应用程序去访问Sharepoint的列表资源。
涉及到Sharepoint的客户端对象模型。
使用 SharePoint Foundation 2010 托管客户端对象模型,您可以设计客户端应用程序,以便无需在运行 Microsoft SharePoint Foundation 2010 的服务器上安装代码即可访问 SharePoint 内容。例如,您可以构建新类别的应用程序,其中包括编写基于 Microsoft .NET Framework 的应用程序、丰富的交互式 Web 部件、Microsoft Silverlight 应用程序以及在 SharePoint Web 部件中运行客户端的 ECMAScript(JavaScript、JScript) 应用程序。
若要构建Windows 控制台托管的客户端对象模型应用程序,您必须添加对以下两个程序集的引用:Microsoft.SharePoint.Client.dll 和 Microsoft.SharePoint.Client.Runtime.dll。安装 SharePoint Foundation 时将会在服务器上安装这两个程序集。这两个程序集位于以下目录中:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\ISAPI
对于 SharePoint Foundation Beta 和 Microsoft SharePoint Server 2010 Beta,您必须复制这两个程序集并将其放到开发客户端计算机上的方便位置。在设置使用 SharePoint Foundation 2010 托管客户端对象模型的项目时,必须通过浏览找到这两个程序集才能添加对它们的引用。
所以本题目正确选项应该是B.C
参考:
SharePoint 2010: Introducing the Client Object Model
http://www.chakkaradeep.com/post/SharePoint-2010-Introducing-the-Client-Object-Model.aspx
http://msdn.microsoft.com/zh-cn/library/ee857094(v=office.14).aspx
Question 130
You need to delete the previous versions of all documents in a document library.
The deleted versions of the documents must be retained in the SharePoint Recycle Bin.
What should you do?
A. For the document library, call the Recycle method.
B. For the document library, call the Delete method.
C. For each document, call the DeleteAll method of the Versions property.
D. For each document, call the RecycleAll method of the Versions property.
解析:
本题是想把被删除的某文档库中的文档保留在Sharepoint的回收箱中,在代码中如何实现。
直接来看各选项提供的相应方法:
选项A. For the document library, call the Recycle method. 此方法用于回收列表(Recycle the List),并返回被收回的列表的GUID。
选项B. For the document library, call the Delete method. 此方法用于删除列表(Delete the List)。
其中选项A.B均是基于SPDocumentLibrary类上的方法。
选项C. For each document, call the DeleteAll method of the Versions property. 此方法用于删除除了当前版本以外的所有的文档列表项。
选项D. For each document, call the RecycleAll method of the Versions property. 此方法用于回收除了当前版本以外的所有的文档列表项。
其中选项C.D均是基于SPListItemVersionCollection类上的方法。
Recycle与Delete的区别是:Recycle要进回收站,Delete则是直接删除掉,再也找不回来。
所以本题目正确选项应该是D
参考:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitemversioncollection.recycleall.aspx
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.splist.recycle(v=office.12).aspx
http://msdn.microsoft.com/zh-cn/library/microsoft.sharepoint.spdocumentlibrary_members(v=office.12).aspx
Sharepoint学习笔记—习题系列--70-573习题解析 -(Q127-Q130)的更多相关文章
- Sharepoint学习笔记—ECM系列—文档列表的Metedata Navigation与Key Filter功能的实现
如果一个文档列表中存放了成百上千的文档,想要快速的找到你想要的还真不是件容易的事,Sharepoint提供了Metedata Navigation与Key Filter功能可以帮助我们快速的过滤和定位 ...
- Sharepoint学习笔记—ECM系列--文档集(Document Set)的实现
文档集是 SharePoint Server 2010 中的一项新功能,它使组织能够管理单个可交付文档或工作产品(可包含多个文档或文件).文档集是特殊类型的文件夹,它合并了唯一的文档集属性以及文件夹和 ...
- Sharepoint学习笔记—习题系列--70-576习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-576习题解析 为便于查阅,这里整理并列出了70-576习题解析系列的所有问题,有些内容可能会在以后更新. 需要事先申明的是: 1. ...
- Sharepoint学习笔记—习题系列--70-573习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-573习题解析 为便于查阅,这里整理并列出了我前面播客中的关于70-573习题解析系列的所有问题,有些内容可能会在以后更新, ...
- Deep Learning(深度学习)学习笔记整理系列之(五)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(八)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(七)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(六)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(四)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(三)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
随机推荐
- 天猫浏览型应用的CDN静态化架构演变
原文链接:http://www.csdn.net/article/2014-01-22/2818227-CDN-Architecture 在天猫双11活动中,商品详情.店铺等浏览型系统,通常会承受超出 ...
- STM32 程序所占用空间计算 && FLASH存储的起始地址计算
程序编译完成,会乘车program size .. 对STM32容量选型或者 计算FLASH 充当EEPROM起始地址时会用到此参数. 按照下面截图 程序空间 = (16700+732+4580)/ ...
- Java hashCode() 和 equals()的若干问题解答
本章的内容主要解决下面几个问题: 1 equals() 的作用是什么? 2 equals() 与 == 的区别是什么? 3 hashCode() 的作用是什么? 4 hashCode() 和 equa ...
- 移除了css框架,世界干净了
在之前的webapp项目里,我使用了bootstrap作为三方的css库,只调取了其中一部分源码的less使用,大部分代码仍然是自己写的. 自己的代码也是参照bootstrap的目录结构和它的一些规范 ...
- [git]用pelican搞一个自己的blog(已完成)
pelican Pelican Static Site Generator, Powered by Python:Pelican是python语言写的静态网站生成器.因为我一直打算用github pa ...
- Mysql 修改密码及重置密码方法
修改密码: //选择数据库 use mysql; //修改密码 update user set password=password('新密码') where user='root'; //立即生效 f ...
- 配置内存中OLTP文件组提高性能
在今天的文章里,我想谈下使用内存中OLTP的内存优化文件组来获得持久性,还有如何配置它来获得高性能.在进入正题前,我想简单介绍下使用你数据库里这个特定文件组,内存OLTP是如何获得持久性的. 内存中O ...
- ASP.NET WebForm与MVC优缺点
发表于我的个人网站中,请点击阅读!
- python学习笔记 - 初识socket
socket socket通常也称作"套接字",用于描述IP地址和端口,是一个通信链的句柄,应用程序通常通过"套接字"向网络发出请求或者应答网络请求. sock ...
- 无废话WCF入门教程一[什么是WCF]
http://www.cnblogs.com/iamlilinfeng/archive/2012/09/25/2700049.html wcf技术交流,同学习共进步,欢迎加群: 群号:3981831 ...