Browse by Tags
All Tags »
WCF (
RSS)
Avoiding Circular Reference for Entity in JSON Serialization One problem that I was facing yesterday while working on an ASP.NET MVC application was a JSON serialization issue. The problem was a circular reference caused by the DataContractJsonSerializer because of relations between the entity and other entities. In this post I’ll show you how you can use a simple workaround in order to avoid the problem. The JSON Serialization Error Returning the output of the JSON method in an...
WCF Data Services Processing Pipeline First I must confess. Even tough I like OData and WCF Data Services, in the last couple of months I didn’t have the chance to work or use them. This is why when .NET 4 was shipped I haven’t noticed a new and interesting extension point in the framework – the processing pipeline . In the last MIX11 I got a little introduction to that extension point in Mike Flasko’s session . In this post I’ll explain what is the WCF Data Services' server side processing pipeline...
Making a JSONP Call to a WCF Data Service using datajs During MIX11 I attended a very interesting session about datajs which was presented by Asad Khan and Marcelo Lopez Ruiz. As I promised in my previous post , in this post I’ll show you how to make a JSONP call to a WCF Data Service using datajs library. A Little About datajs datajs is a very promising JavaScript library which is currently being built by Microsoft as an open source in CodePlex. The library as described in its CodePlex site is ...
Configuring WCF Data Services using Lambda Expressions One of the things that I avoid when I’m writing code is the use “magic strings”. Hardcoded strings are a code smell and should be rarely used. When using WCF Data Service configuration object you’ll have to pass the entity set’s string name to the configuration methods which as I wrote I would like to avoid. This is why in today’s post I’m going to extend the DataServiceConfiguration object to support lambda expressions instead of string parameters...
MIX11 Third Day Sessions Summary Here is a summary of the sessions I attended in the third day of MIX11: The Future of HTML5 In the session Giorgio Sardo talked about What is HTML5? – HTML’s new specifications which are getting specified by W3C, IETF and ECMA in working groups for each specification out of ~100 specifications. Microsoft thinks that HTML5 is ready to go to Last Call phase in May 2011 – meaning it will need to go to RC and then recommendation afterward. Microsoft approach for HTML5...
Using EF DbContext with WCF Data Services One of the questions that you may ask yourself with the new EF feature CTP5 is how to embed the new DbContext object inside an OData service or more particularly inside WCF Data Service . This post will supply the solution. DbContext as WCF Data Service Data Source Entity Framework has a good integration with WCF Data Services . All you need to do when you create a WCF Data Service with EF is to put the generated ObjectContext as a data source of the service...
Exposing a Stored Procedure in WCF Data Service Today I answered a question in the data platform development forums. The question was simple – how to expose a stored procedure which is mapped to an Entity Framework model through a WCF Data Service . This post will show you exactly how to do this. The Stored Procedure First I’ve created a the following stored procedure: CREATE PROCEDURE dbo.GetCoursesOrderByTitle AS BEGIN SET NOCOUNT ON SELECT CourseID, Title, Days, [ Time ], Location, Credits, DepartmentID...
Using .Net WCF Syndication API to Read a Comments Feed In the last few days I have started a migration process to my own domain – www.gilfink.net . Currently this domain is redirecting to this blog but in the near future I’ll move my blog to there. I’ll keep publishing in this blog along with the new one so don’t worry. One of the biggest problems I got stuck with was that this blog community server doesn’t include an export feature like in other blog platforms like BlogEngine.Net . So I’m...
OData Session Slide Deck and Demos Yesterday’s evening I delivered an OData session at the Israeli Web Developer Community ( WDC ) user group at Microsoft Ra’anana. The session included the following agenda: The OData need. What is OData ? Creating and consuming OData feeds. I want to thank all the attendees who came to the session. I really enjoyed to deliver the content about OData and the audience was very cooperative with a lot of good questions that helped to highlight many crucial...
OData Session is Occurring Today Today at 17:30 I’m delivering an OData session at Microsoft office in Ra’anana. Come and hear about the Open Data Protocol, a new protocol for exposing and consuming data on the web. The OData ecosystem is a growing community of data producers and consumers using the Open Data Protocol to exchange data. The Open Data Protocol breaks down data silos and increases the shared value of data and its associated business logic through the Web by enabling the exposure of...
Add Service Reference – How to Avoid Generating Already Existing Classes Today I was asked how to avoid generating an already existing client class when we use the Add Service Reference menu item in Visual Studio . The Problem In the e-mail I got the question was regarding the use of ValidationResults (from the Validation Application Block ) as a return type for a WCF Service . When they try to Add Service Reference to the service it is generating a new ValidationResults class for the use in...
Windows Server AppFabric One of the announcements in the PDC was the release of beta1 for a new windows server which is called AppFabric . What is AppFabric? From the AppFabric site – “ Windows Server AppFabric is a set of integrated technologies that make it easier to build, scale and manage Web and composite applications that run on IIS. ” AppFabric is a collection of technologies in one consolidated place. These technologies are Microsoft Distributed Cache (aka “ Velocity ”), Windows Workflow...
Making Cross-Domain Ajax Requests for a Data Service One problem that exists when using ADO.NET data services is cross-domain requests. For security reasons, XMLHTTP requests don’t allow cross-domain HTTP requests. So what can we do if we want to make an Ajax call for a data service that isn’t located in our domain? this post will try to give a solution to this problem. Making a Cross-Domain Ajax Request for a Data Service As stated early in the post’s start, for security reasons, XMLHTTP requests...
Building a Host for ADO.NET Data Service After you built your data service you will probably want to deploy it. In the following post I’m going to explain how you can build a simple host for an ADO.NET data service without the use of svc file. Data Service Hosting The ADO.NET data services are not autonomous server entities. They live in the context of their service host such as WCF or ASP.NET . The data service host is handling the direct interactions with the network and supports caching, scalability...