@Prog! - ASP.NET -
ASP.NET(C#) - AJAX, Silverlight - のメモ書き

ADO.NET Data Service

最新の投稿は、投稿日時: 04-23-2009 10:44 投稿者: Yu Asano です。スレッドには 3 件の返答があります。
  • 04-23-2009 10:39

    • Yu Asano
    • 貢献度トップ 10
    • 登録日 : 10-23-2008
    • Japan
    • 投稿数 239
    • ポイント 0

    ADO.NET Data Service

    WebDataService.svc
    <%@ ServiceHost Language="C#" Factory="System.Data.Services.DataServiceHostFactory" Service="Items" %>

    • 投稿ポイント: 0
  • 04-23-2009 10:41 回答元:

    • Yu Asano
    • 貢献度トップ 10
    • 登録日 : 10-23-2008
    • Japan
    • 投稿数 239
    • ポイント 0

    Re: ADO.NET Data Service

    //WebDataService.cs

    using System.Data.Services;
    using MomotchiModel;

    public class Items : DataService<MomotchiEntities>
    {
        // このメソッドは、サービス全体のポリシーを初期化するために、1 度だけ呼び出されます。
        public static void InitializeService(IDataServiceConfiguration config)
        {
            // TODO: 表示や更新などが可能なエンティティ セットおよびサービス操作を示す規則を設定してください
            // 例:
            config.SetEntitySetAccessRule("Table1", EntitySetRights.AllRead);
            // config.SetServiceOperationAccessRule("MyServiceOperation", ServiceOperationRights.All);
        }
    }

    タグ: ,
    • 投稿ポイント: 0
  • 04-23-2009 10:43 回答元:

    • Yu Asano
    • 貢献度トップ 10
    • 登録日 : 10-23-2008
    • Japan
    • 投稿数 239
    • ポイント 0

    Re: ADO.NET Data Service

    http://localhost/WebSite1/WebDataService.svc/

     <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
    <service xml:base="http://localhost/WebSite1/WebDataService.svc/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:app="http://www.w3.org/2007/app" xmlns="http://www.w3.org/2007/app">

    - <workspace>
      <atom:title>Default</atom:title>
    - <collection href="Table1">
      <atom:title>Table1</atom:title>
      </collection>
      </workspace>
      </service>
    • 投稿ポイント: 0
  • 04-23-2009 10:44 回答元:

    • Yu Asano
    • 貢献度トップ 10
    • 登録日 : 10-23-2008
    • Japan
    • 投稿数 239
    • ポイント 0

    Re: ADO.NET Data Service

    http://localhost/WebSite1/WebDataService.svc/Table1

      <?xml version="1.0" encoding="utf-8" standalone="yes" ?>
    - <feed xml:base="http://localhost/WebSite1/WebDataService.svc/" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns="http://www.w3.org/2005/Atom">
      <title type="text">Table1</title>
      <id>http://localhost/WebSite1/WebDataService.svc/Table1</id>
      <updated>2009-04-23T01:44:11Z</updated>
      <link rel="self" title="Table1" href="Table1" />
    - <entry>
      <id>http://localhost/WebSite1/WebDataService.svc/Table1(1)</id>
      <title type="text" />
      <updated>2009-04-23T01:44:11Z</updated>
    - <author>
      <name />
      </author>
      <link rel="edit" title="Table1" href="Table1(1)" />
      <category term="COMMONModel1.Table1" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    - <content type="application/xml">
    - <m:properties>
      <d:aaa m:type="Edm.Int32">1</d:aaa>
      <d:bbb>aaa</d:bbb>
      </m:properties>
      </content>
      </entry>
    - <entry>
      <id>http://localhost/WebSite1/WebDataService.svc/Table1(2)</id>
      <title type="text" />
      <updated>2009-04-23T01:44:11Z</updated>
    - <author>
      <name />
      </author>
      <link rel="edit" title="Table1" href="Table1(2)" />
      <category term="COMMONModel1.Table1" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    - <content type="application/xml">
    - <m:properties>
      <d:aaa m:type="Edm.Int32">2</d:aaa>
      <d:bbb>bbb</d:bbb>
      </m:properties>
      </content>
      </entry>
    - <entry>
      <id>http://localhost/WebSite1/WebDataService.svc/Table1(3)</id>
      <title type="text" />
      <updated>2009-04-23T01:44:11Z</updated>
    - <author>
      <name />
      </author>
      <link rel="edit" title="Table1" href="Table1(3)" />
      <category term="COMMONModel1.Table1" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    - <content type="application/xml">
    - <m:properties>
      <d:aaa m:type="Edm.Int32">3</d:aaa>
      <d:bbb>ccc</d:bbb>
      </m:properties>
      </content>
      </entry>
      </feed>
    • 投稿ポイント: 0
ページ 1 / 1 (4 アイテム) | RSS

momotchi.net
Powered by Community Server (Non-Commercial Edition), by Telligent Systems