WCF Data Services 5.6.0 Alpha
Today we are releasing updated NuGet packages and tooling for WCF Data Services 5.6.0. This is an alpha release and as such we have both features to finish as well as quality to fine-tune before we release the final version.
You will need the updated tooling to use the portable libraries feature mentioned below. The tooling installer is available from the download center.
What is in the release:
Visual Studio 2013 Support
The WCF DS 5.6.0 tooling installer has support for Visual Studio 2013. If you are using the Visual Studio 2013 Preview and would like to consume OData services, you can use this tooling installer to get Add Service Reference support for OData. Should you need to use one of our prior runtimes, you can still do so using the normal NuGet package management commands (you will need to uninstall the installed WCF DS NuGet packages and install the older WCF DS NuGet packages).
Portable Libraries
All of our client-side libraries now have portable library support. This means that you can now use the new JSON format in Windows Phone and Windows Store apps. The core libraries have portable library support for .NET 4.0, Silverlight 5, Windows Phone 8 and Windows Store apps. The WCF DS client has portable library support for .NET 4.5, Silverlight 5, Windows Phone 8 and Windows Store apps. Please note that this version of the client does not have tombstoning, so if you need that feature for Windows Phone apps you will need to continue using the Windows Phone-specific tooling.
URI Parser Integration
The URI parser is now integrated into the WCF Data Services server bits, which means that the URI parser is capable of parsing any URL supported in WCF DS. We are currently still working on parsing functions, with those areas of the code base expected to be finalized by RTW.
Public Provider Improvements
In the 5.5.0 release we started working on making our providers public. In this release we have made it possible to override the behavior of included providers with respect to properties that don’t have native support in OData v3. Specifically, you can now create a public provider that inherits from the Entity Framework provider and override a method to make enum and spatial properties work better with WCF Data Services. We have also done some internal refactoring such that we can ship our internal providers in separate NuGet packages. We hope to be able to ship an EF6 provider soon.
Known Issues
With any alpha, there will be known issues. Here are a few things you might run into:
- We ran into an issue with a build of Visual Studio that didn’t have the NuGet Package Manager installed. If you’re having problems with Add Service Reference, please verify that you have a version of the NuGet Package Manager and that it is up-to-date.
- We ran into an issue with build errors referencing resource assemblies on Windows Store apps. A second build will make these errors go away.
We want feedback!
This is a very early alpha (we think the final release will happen around the start of August), but we really need your feedback now, especially in regards to the portable library support. Does it work as expected? Can you target what you want to target? Please leave your comments below or e-mail me at mastaffo@microsoft.com. Thank you!
Comments
Anonymous
June 28, 2013
As always, this announcements comes without any sort of documentation, so for us (developer) is a little bit hard to find out how to start playing with new features and new capability and because of this provide feedback is difficult too. I would really appreciate if forthcoming posts will include some code samples (e.g as Rowan Miller does for EF announcements posts blogs.msdn.com/.../ef-and-visual-studio-2013-preview.aspx)Anonymous
June 28, 2013
How about compression support on Windows Phone?Anonymous
June 29, 2013
greatAnonymous
July 02, 2013
Please add the ability to group and (I beg) lazy loading of class fields (such as binary data)Anonymous
July 03, 2013
Are the installers still compatible with Windows XP? Or is the last version of WCF Data Services that was supported under XP 5.0? ThanksAnonymous
July 03, 2013
I don't expect full documentation, but a code example of each feature would improve adoption (if you are serious about wanting feedback).Anonymous
July 03, 2013
Also, an acknowledgement that your read the comments of your blog posts would also be nice.Anonymous
July 07, 2013
Please introduce data compression support - not a rocket sience, right? Thanks.Anonymous
July 08, 2013
The comment has been removedAnonymous
July 10, 2013
Is there any support coming for joining entities?Anonymous
July 10, 2013
Hello Mark: I've been trying to start a discussion with your team around the providers and other details about the WCF Data Services, but my tries have been ignored. Considering you quoted your disposition to hear us I will try it again. I posted on WCF Data Services 5.5.0 and I will repost here my first comments for your team: "Tue, May 21 2013 3:51 PM Thanks you guys, you are doing amazing work here with WCF Data Services, I really appreciate you make public the built-in providers. I had been making pitfalls loading them through reflection. I have been moving towards some scenaries where a different perspective could be nice. For example I’ve been working around to generate a custom WCF Data Service Provider from one Entity Data Model (it is extended with custom annotations to guide layer code generation). I’ve read your source code to follow your logic, but I discovered many logic that I cannot do myself because it requires access to internal members, for example the custom annotations. I use the EDM on design mode, that means you must create a EDM, annotate it with custom annotations on EF designer and I generate the source code to cover the application architecture logic, but you really don’t have the EDM on runtime. It means I cannot use the built-in WCF Data Service EF provider, then I use your Reflection Provider. Of course I dealt too with missing features like enum support. I don’t understand why, at least, you don't generate enum properties based on numeric enum type (byte, int). Is there any problem with this temporal solution? The reflection provider requires one defined type with properties and all steps you know it’s needed. Could the reflection provider do expose members to make fluent and interactive metadata generation? For example: GetResourceType(Type t), GetResourceProperty(PropertyInfo info), it can allow to me use your baseline logic and insert my own information including but not limited to virtual properties and/or associations. I guess I cannot emit the virtual types because on these cases the InstanceType will not be the real type. Regards. PD: If you need I can write more details about my scenary." (CONTINUED)Anonymous
July 10, 2013
The comment has been removedAnonymous
July 10, 2013
The comment has been removedAnonymous
July 10, 2013
The comment has been removedAnonymous
July 10, 2013
Are you going to support Windows Phone 7.5?Anonymous
July 10, 2013
The comment has been removedAnonymous
July 17, 2013
Excellent Post. Also visit www.msnetframework.comAnonymous
July 23, 2013
I appreciate the continued efforts to improve WCF data services. My #1 issue is EF 6.0 support - it's at rc1, so should be out soon. It is superior to EF 5.x in so many ways, that I'm spending time trying to make web API odata a suitable replacement for WCF data services server.Anonymous
July 30, 2013
The comment has been removedAnonymous
August 15, 2013
@Mark Stafford - MSFT 8 Jul 2013 8:34 AM Do you have any news about documentation or samples, especially about "provider that inherits from Entity Framework provider and override a method to make enum and spatial properties work better with WCF Data Services"? As far as I understand, complex types (*) are already supported by DS 5.5, enums are waiting for oData V4, but what about spatial types such as DbGeography? Is there a solution using classic EF DS Provider in DS 5.6a that supports or at least doesn't crash when exposing such a type? In the many different approches I tried (DS 4.0/5.0/5.5/5.6a, oData V2/V3, oData Web API + EF 5.0), the only workaround I found was:
- forcing DS to use the Reflection DS Provider with an custom "context" class (instead of the EMDX generated DbContext class)
- ignoring the DbGeography type property using the IgnoreProperties attribute, which is only interpreted by the Reflection DS provider (not EF DS provider, reason of step 1)
- creating a corresponding spatial type property (GeographyPoint) supported by oData
- using a wrapper to map these 2 types, as explained here: www.odata.org/.../how-to-use-sql-spatial-data-with-wcf-odata-spatial This solution works (DS 5.5 and 5.6a) for some simple queries, and even returns spatial information! $top and $filter options are correctly handled (SQL Server Profiler). Projections ($select) however crash: "Unable to create a null constant value of type 'System.Data.Services.Internal.ProjectedWrapper3'. Only entity types, enumeration types or primitive types are supported in this context." Spatial queries as well, e.g. $filter=geo.distance(DSLocation, geography'Point(-122.03547668457 47.6316604614258)') lt 4: "LINQ to Entities does not recognize the method 'System.Nullable`1[System.Double] Distance(System.Spatial.Geography, System.Spatial.Geography)' method, and this method cannot be translated into a store expression."
- Anonymous
August 15, 2013
I'd love to provide some more feedback about DS 5.6a, but I'm kind of stuck as I didn't experienced any differences yet between versions 5.5 and 5.6a, and the above workaround (using Reflection provider) isn't really acceptable regarding my requirements, i.e. oData queries using:
- ideally Data Services 5.5/5.6 or, if no choice, oData Web API, but currently Web API is even not supporting projection ($select)
- with Entity Framework 5/6 supporting:
- projection ($select, $expand)
- filtering ($filter)
- sorting ($orderby)
- paging ($top, $skip)
- count ($inlinecount) of
- simple property
- navigation property
- spatial types
- complex types (*) (not mandatory)
- enums (not mandatory) So if you could provide some samples, I'd be happy to give you further assessments.
- by the way, isn't it disappointing not being able to make projection ($select) of complex types? DS 5.5: $expand=ComplexProperty&$select=ComplexProperty/Property => "$select doesn't support projecting properties of complex type." DS 5.6a: $expand=ComplexProperty&$select=ComplexProperty/Property => "Inner or start path segments must be navigation properties in $select."