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 ...
随机推荐
- ruby AES加密解密
最近和京东合作做一个项目,在接口对接传递参数时,参数需要通过AES加密解密. 本来想到用gem 'aescrypt'处理,但是aescrypt的编码方式用的base64,而京东那边用的是16进制.所以 ...
- PE渲染引擎 二
增加了DOF
- .Net底层剖析目录章节
[.Net底层剖析]目录章节 1.[深入浅出.Net IL]1.一个For循环引发的IL 2.[.Net底层剖析]2.stfld指令-给对象的字段赋值 3.[.Net底层剖析]3.用IL来理解属性 作 ...
- C#结构体的特点浅析
C#结构体的特点浅析 2009-08-13 11:18 意识的偏差 百度空间 字号:T | T C#结构体的特点有哪些呢?C#结构体与类的区别是什么呢?本文就向你介绍相关的内容. AD: C# ...
- Java 集合系列14之 Map总结(HashMap, Hashtable, TreeMap, WeakHashMap等使用场景)
概要 学完了Map的全部内容,我们再回头开开Map的框架图. 本章内容包括:第1部分 Map概括第2部分 HashMap和Hashtable异同第3部分 HashMap和WeakHashMap异同 转 ...
- Android 学习笔记之Volley(六)实现获取服务器的字符串响应...
学习内容: 1.使用StringRequest实现获取服务器的字符串响应... 前几篇一直都在对服务——响应过程的源码进行分析,解析了整个过程,那么Volley中到底实现了哪些请求才是我们在开发中 ...
- 如何用参数化SQL语句污染你的计划缓存
你的SQL语句的参数化总是个好想法.使用参数化SQL语句你不会污染你的计划缓存——错!!!在这篇文章里我想向你展示下用参数化SQL语句就可以污染你的计划缓存,这是非常简单的! ADO.NET-AddW ...
- 非聚集索引中的临界点(Tipping Point)
什么是临界点? 注意,我要说的问题是非聚集索引的执行计划从Seek+Lookup变成Table/Clustered Index Scan的临界点.SQL Server的访问数据的IO最小单元是页. 我 ...
- Razor视图引擎语法
@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport&quo ...
- H5案例学习笔记
★基础篇 增加主体结构元素