Hi folks. Thought I'd share some tinkering I've done lately.
I wanted to see if I could get a Xamarin.Forms sample app adapted from using SQLite.Net PCL to using Entity Framework Core instead (but still SQLite underneath), on all three mobile platforms. I also wanted to use a .NET Standard project for shared app logic, instead of a PCL. And in particular, I wanted to make sure the combination could work on iOS not just in theory (simulator, no linking) but targeting a real device and using framework SDK linking — typically a picky build target combination, and EF Core did present some specific linking challenges.
I'm happy to say that all the key bits (frameworks, libraries, tools) do support this particular 3x cross-platform stack today — even if the tooling and project templates have a little catching up to do. (I found myself unloading projects in VS2017 a couple of times to make some manual adjustments to the *.csproj file.) Crossing my fingers that, soon, building an app on this stack won't require any special tricks and that project templates will facilitate.
FWIW, one of the reasons I'm interested in looking at EF Core over SQLite.NET PCL (which already worked across the 3x mobile platforms) is that EF Core enables further code reuse with a .NET server side of a non-trivial mobile app. Consider this potential round-trip scenario: (a) ASP.NET Core web API server app loads an object from SQL Server (or other store) using EF Core, (b) API server serializes object as JSON and sends over HTTP to mobile client app, (c) mobile app deserializes object from JSON, (d) mobile app uses EF Core to cache object locally in SQLite database, and (e) all the way back again on a change. While I don't believe in silver bullets, one less ORM in the mix will be nice.
Anyway, the result of my tinkering is shared at https://github.com/cwrea/XamarinTodo. Comments and questions welcome here.
Chris W. Rea