Web API : One side object materialization

Recently I’ve been working on a api project where the requirement was that any data on the api service side is plain xml, stored in database as xml type column. No binding and object materialization is done on the server. However the client has to operate on clr objects. I am going to show you the solution I came to. I have chosen the Web API 2 as the service architecture, sinc…

By Mirek on (tags: Web API, web service, XML, categories: architecture)

Version tolerant XML Serialization

One of the beauties of xml, is that it can be extended without breaking applications. You can add element to the xml document tree and the application should not crash or fail while consuming this xml. This is what we can read on the w3schools.com xml tutorial. But how is this with serialization of the xml? Recently I found a guide on MSDN which is called Version Tolerant Seria…

By Mirek on (tags: Version Tolerant Serialization, XML, categories: architecture, code)

Mapping XML column with XSD schema validation in EF Code First

The XML data type allows storing a xml content in our SQL Server database. The great feature is that we can also attach an XSD schema to it and have the xml content automatically validated. Here I am going to show you how to set it up together with Entity Framework Code First. Storing XSD Schema in database and mapping entity One could ask: what is the point of validating the x…

By Mirek on (tags: Entity Framework, SQL Server, XML, XSD, categories: architecture, code)