用 OData Service 访问在线法律
2012-03-04 12:24
148 查看
用 OData Service 访问在线法律
// 编译命令
//"C:\Program Files\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe" --optimize- --tailcalls- --platform:x86 -r:"C:\Program Files\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0\FSharp.Core.dll" -r:"E:\Projects\F#3\FSharp.Data.TypeProviders.dll"
-r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile\Client\System.Core.dll" -r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile\Client\System.Data.Services.Client.dll" -r:"C:\Program
Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile\Client\System.dll" --noframework TypeProviderODataConsumerLegalArticles.fsx
#if INTERACTIVE
#r @"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll";;
#endif
open System.Data.Services.Client;;
#if INTERACTIVE
#r @"E:\Projects\F#3\FSharp.Data.TypeProviders.dll"
#endif
open Microsoft.FSharp.Data.TypeProviders;;
open System.Net;;
[<Generate>]
type Lawyers = ODataService< @"https://api.datamarket.azure.com/LexisNexis/ConsumerLegalArticles/" >
let LawyersDotCom() =
let articles = Lawyers.GetDataContext()
articles.Credentials <- NetworkCredential("MSN帐号","主帐户密钥")
let q = query {
for a in articles.Articles do
where (a.State = "Washington")
select a
}
q |> Seq.iter ( fun n -> printfn "%A" n.Title)
LawyersDotCom()
但是,我的帐号,好像不能访问。
// 编译命令
//"C:\Program Files\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe" --optimize- --tailcalls- --platform:x86 -r:"C:\Program Files\Reference Assemblies\Microsoft\FSharp\3.0\Runtime\v4.0\FSharp.Core.dll" -r:"E:\Projects\F#3\FSharp.Data.TypeProviders.dll"
-r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile\Client\System.Core.dll" -r:"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile\Client\System.Data.Services.Client.dll" -r:"C:\Program
Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\Profile\Client\System.dll" --noframework TypeProviderODataConsumerLegalArticles.fsx
#if INTERACTIVE
#r @"C:\Program Files\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5\System.Data.Services.Client.dll";;
#endif
open System.Data.Services.Client;;
#if INTERACTIVE
#r @"E:\Projects\F#3\FSharp.Data.TypeProviders.dll"
#endif
open Microsoft.FSharp.Data.TypeProviders;;
open System.Net;;
[<Generate>]
type Lawyers = ODataService< @"https://api.datamarket.azure.com/LexisNexis/ConsumerLegalArticles/" >
let LawyersDotCom() =
let articles = Lawyers.GetDataContext()
articles.Credentials <- NetworkCredential("MSN帐号","主帐户密钥")
let q = query {
for a in articles.Articles do
where (a.State = "Washington")
select a
}
q |> Seq.iter ( fun n -> printfn "%A" n.Title)
LawyersDotCom()
但是,我的帐号,好像不能访问。
相关文章推荐
- 用 OData Service 访问在线的 Northwind 数据库
- 用 OData Service 访问 China Enterprises Data
- Jquery 跨域访问 Lightswitch OData Service的方法
- 用 OData Service 访问 MarketBank
- 用 OData Service 访问 U.S. Consumer Price Index
- 用 OData Service 访问 Demographics
- 用 OData Service 访问云数据
- 用 OData Service 访问 US Bank
- 用 OData 访问 Utility Rate Service
- 用 ODataService 访问 LexisNexis
- Jquery 跨域访问 Lightswitch OData Service的方法
- 用 OData Service 访问 US Crime 数据
- Android 通过蒲公英pgyer的接口 Service 实现带进度下载App 通知栏显示 在线更新 自动更新Demo
- 应用apache+tomcat的方式,是否可以支持3000人同时在线访问
- NT Service中OpenFileMapping"拒绝访问"错误之分析
- [原创] .net webservice 登录后 才可以访问其它的方法 2种方法
- Application全局对象 实现统计当前在线人数和总访问次数
- Android应用程序访问linux驱动第三步:实现并向系统注册Service
- jit 调试失败,出现以下错误:拒绝访问。jit调试由用户帐户"NT AUTHORITY\NETWORK SERVICE" 启动
- C# usb Hid 访问上位机USB通讯实例 实现设备在线或者离线和发送接收数据通讯功能