Well, it’s been a busy week. Unfortunately it hasn’t left me with much time to write any meaningful blog entries – apologies. Last Friday I managed to implement an end-to-end solution for object graph serialization with Entity Framework (v4) POCO objects to and from WCF Web Services (note: for .Net clients only at this stage).
It is a fairly complicated thing to explain, so I’m only going to go into detail if there is sufficient interest in the solution. There is sufficient material to be found on the Internet (see my previous post for links), but it’s certainly not all in one place and you would have to combine aspects of a different example – in the case of supporting serialization back from the WCF client (via a generated proxy).
The summary goes something like this:
- Create edmx model
- Generate POCO entities using the template support
- Split the entities into a separate assembly
- Consume the entities and context via a Web Service (WCF) facade
- Implement a custom attribute to handle EF Proxies
- Implement a custom attribute to handle cyclic references (for entities with a self-reference) – (if needed)
- Implement a custom attribute to be outputted in the client proxy stub – (if needed)
- Use the common assembly with the client and the WCF service
So – in short – if you are interested in a detailed entry (or series of entries) please leave a comment here, otherwise I may get to the subject later in the year when I have more time (and if there is interest).
In other news, I did some work with a WinForms client and TreeView control which was my first Windows Application for quite a while. I’ve got to say, I’m really impressed how easy it is to use TreeView controls in .Net WinForms over MFC/C++. Back in the old days, TreeView controls were a bit tricky to work with – .Net makes it almost too easy.