ADO.NET Data Services 的Self-Hosting例子(.NET 3.5 SP1)

之前有写一篇关于ADO.NET Data Services hosting在一个控制台程序中的做法。详细见–ADO.NET Data Services 的Self-Hosting实例http://blogs.msdn.com/ccboy/archive/2008/01/12/ado-net-data-services-self-hosting.aspx今天找了一下,发现原来的代码找不到,于是重新尝试了一下,看看.NET 3.5 SP1之后是否有变化。 ADO.NET Data Services逐渐成为一个非常不错的工具和武器,它完美的和ADO.NET Entity Framework结合,可以说很大程度弥补了EF目前分布式开发的短板,同时Data Services本身也成功的削弱了WCF原来基于SOAP的组件通信的沉重,可以说利用了WCF最好的部分。 例子分为测试了两种情况,一种是使用WCF配置文件的方式;一种是不需要配置文件的方式。当baseAddress 参数传空,系统会默认是使用配置文件的方式。 另外例子尝试使用自定义的数据源,即非ADO.NET EF和 SQL To LINQ的方式。 例子可以在这里下载:http://code.msdn.microsoft.com/Release/ProjectReleases.aspx?ProjectName=ccBoy&ReleaseId=1391 下面的信息是非常有用的Data Service Host (ADO.NET Data Services Framework)http://msdn.microsoft.com/en-us/library/cc668805.aspx NET Framework Class Library–WebServiceHost Classhttp://msdn.microsoft.com/en-us/library/system.servicemodel.web.webservicehost.aspx


more information …about VS2008 SP1 and .NET FX 3.5 SP1

ScottGu’s – Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx What’s New in the SP1 Beta? – ADO.NET and Entity Framework http://blogs.msdn.com/adonet/archive/2008/05/12/what-s-new-in-the-sp1-beta.aspx ADO.NET Entity Framework –MSDN 文档 http://vs2008sp1docs.msdn.microsoft.com/en-us/ms439009.aspx Visual Studio 2008 and .NET Framework 3.5 Service Pack 1 Beta http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx ADO.NET Entity Framework Query Samples http://code.msdn.microsoft.com/EFQuerySamples/Release/ProjectReleases.aspx?ReleaseId=1013 ADO.NET Data Services Framework Beta…

1

.NET FX 3.5 sp1 with ADO.NET Entity Framework

Microsoft .NET Framework 3.5 Service pack 1 Betahttp://www.microsoft.com/downloads/details.aspx?FamilyId=23516C63-2DB2-4E7F-AABA-32B12D6E025C&displaylang=en Microsoft Visual Studio 2008 Service Pack 1 Betahttp://www.microsoft.com/downloads/details.aspx?FamilyId=CF99C752-1391-4BC3-BABC-86BC0B9E8E5A&displaylang=en NET Framework 3.5 Service Pack 1 Beta and Expression Blend http://blogs.msdn.com/expression/archive/2008/04/18/vs2008sp1.aspx


PowerCommands 1.1

如果你已经习惯了Coderush或Refactor! Pro的复杂和庞大,到时可以尝试一下 PowerCommands 1.1 for Visual Studio 20081.1版本包括下面的功能: Enable/Disable PowerCommands in Options dialogThis feature allows you to select which commands to enable in the Visual Studio IDE. Point to the Tools menu, then click Options. Expand the PowerCommands options, then click Commands. Check the commands you would like to enable.Note: All power commands are initially…

1

Silverlight 2 Beta 1 发布

Microsoft Silverlight Tools Beta 1 for Visual Studio 2008 –silverlight_chainer.exehttp://www.microsoft.com/downloads/details.aspx?FamilyID=e0bae58e-9c0b-4090-a1db-f134d9f095fd&DisplayLang=en Silverlight 2 Beta 1 runtime:http://silverlight.dlservice.microsoft.com/download/6/6/3/663404e9-990d-4b74-873c-c4611aea2133/Silverlight.2.0.exe Silverlight 2 Beta 1 SDK:http://www.microsoft.com/downloads/details.aspx?FamilyID=4e03409a-77f3-413f-b108-1243c243c4fe&DisplayLang=en Silverlight 2 Beta 1Controls Source Code:http://www.microsoft.com/downloads/details.aspx?FamilyID=ea93dd89-3af2-4acb-9cf4-bfe01b3f02d4&DisplayLang=en Silverlight 2 Beta 1 CHM文档 -39M:http://www.microsoft.com/downloads/details.aspx?FamilyID=1840cab5-196c-4264-b55d-562242a72625&DisplayLang=en Silverlight 2 Beta 1 Document online -MSDN 文档http://msdn2.microsoft.com/en-us/library/bb404700.aspx Silverlight 2 Beta 1 runtime for Mac OS X:http://www.microsoft.com/Silverlight/handlers/getSilverlight.ashx?v=2.0&targetplatform=macintel Expression Blend 2.5 March Preview:http://www.microsoft.com/downloads/details.aspx?FamilyID=32a3e916-e681-4955-bc9f-cfba49273c7c&DisplayLang=en ASP.NET…

1

Entity Framework Toolkits & Extensions

昨天在Daniel的EntityBag Part V – ContexSnapshot Constructing and Applying文章下面询问一个没有发现的函数-CreateOriginalValuesObjectWithReferences,很快他就给出了回复,并且给了一个源代码的项目地址http://code.msdn.microsoft.com/entitybag,非常感谢:)  然后一看还发现不少EF相关的项目,也许应该说持续增长中吧。 http://code.msdn.microsoft.com/adonetefx 下面有三个小的项目。 eSqlBlast (Entity SQL Tools and Samples Page)eSqlBlast aids authoring, executing, and visualizing ad-hoc Entity SQL queries against arbitrary EDM models. The tools of the eSqlBlast suite may be used interactively, from the command line, or embedded in other programs. The eSqlBlast suite also contains…

1

WCF Web Programming Model Documentation

Conceptual Overviews: Web Programming Model AJAX and JSON WCF Syndication (Atom and RSS) Partial Trust Class Library Reference (not exhaustive): System.ServiceModel.Web Namespace System.ServiceModel.Syndication Namespace System.Runtime.Serialization.Json Namespace SyndicationFeed Class SyndicationItem Class WebOperationContext Class WebServiceHost Class WebGetAttribute Class WebInvokeAttribute Class WebHttpBehavior Class WebScriptEnablingBehavior Class DataContractJsonSerializer Class Configuration Schema: enableWebScript webHttp webHttpBinding   Source: WCF Web Programming Model…


ADO.NET Data Services 的Self-Hosting实例

Fast, simple test app for ADO.NET Data Serviceshttp://blogs.msdn.com/marcelolr/archive/2008/01/02/fast-simple-test-app-for-ado-net-data-services.aspx Mike Taulty 的Webloghttp://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2007/12/19/10028.aspx 以及Christian Weyer的Webloghttp://blogs.thinktecture.com/cweyer/archive/2007/12/11/415057.aspx 都有讨论Astoria ServiceHost在一个控制台的应用中,因为目前版本的Astoria CTP只提供了WebHosting/ASP.NET(模式),当然这非常容易应用在Web开发的环境中,看了他们的Weblog,自己测试了一下,果然是可行的。   1.先创建一个控制台的应用(VS2008)2.增加一个ADO.NET Entity Data Model(或者是加入一个已经创建EDM Lib的项目引用) 创建一个ObjectContext,比如:BlogEntities3.创建SvcImp的cs文件,实现WebDataService (BlogSvcImp.cs) using System;using System.Web;using System.Collections.Generic;using System.ServiceModel.Web;using System.Linq;using Microsoft.Data.Web;using BlogModel; namespace SelfHostSvc{    public class BlogSvcSelfHost : WebDataService<BlogEntities>    {         public static void InitializeService(IWebDataServiceConfiguration config)        {             config.SetResourceContainerAccessRule(“*”, ResourceContainerRights.AllRead);             // Example for service operations            //…

2

DP 关注之一(2008/01/09)

LINQKithttp://www.albahari.com/nutshell/linqkit.html   LINQ Dynamic Query Libraryhttp://weblogs.asp.net/scottgu/archive/2008/01/07/dynamic-linq-part-1-using-the-linq-dynamic-query-library   EF FAQ updated – v0.3 http://blogs.msdn.com/dsimmons/archive/2008/01/04/ef-faq-updated-v0-3.aspx   .NET – LINQ to SQL : part 1,2,3,4 1.http://www.scip.be/index.php?Page=ArticlesNET02&Lang=EN2.http://www.scip.be/index.php?Page=ArticlesNET03&Lang=EN3.http://www.scip.be/index.php?Page=ArticlesNET04&Lang=EN4.http://www.scip.be/index.php?Page=ArticlesNET10&Lang=EN   Performance comparison with Parallel Extensions .NET 3.5http://www.scip.be/index.php?Page=ArticlesNET08&Lang=EN   Multiple extension method with same name on same classhttp://www.vikramlakhotia.com/Multiple_extension_method_with_same_name_on_same_class.aspx   ADO.NET Data Services – Exposing Arbitrary Data 1,2,3,41.http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/01/03/10065.aspx2.http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/01/03/10067.aspx3.http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/01/03/10070.aspx4.http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2008/01/03/10073.aspx   Fast, simple test app…

1