The work for convert the existing .NET 4.5 code for support WinRT was more easier than I thought. In fact almost the entire code base is the same for .NET4.5 and WinRT, the only that I needed for reuse the code is a little bit of condicional compilation magic, and reimplement the socket layer using new WinRT Socket API.
Enjoy it! 🙂
If you want to browse the code go to here.
- Include: allows to configure the eager load with expressions rather than strings.
- EnsureLoad: allows to load a collection or reference safely with lazy load.
- LoadByKey: If an object is in the context this method returns it. Otherwise return the object from the database.
- ToTraceQuery: similiar to .ToTraceString( ) but better :).
Download the code of this extensions from here.