Dapper in Metro apps

dapper microsoft-metro windows-runtime

Question

Is there any way to include Dapper in metro apps? It relies on System.Data which is left out in WinRT. If not is there any similar framework which can be used?

Accepted Answer

Is there any way to include Dapper in metro apps?

No. As you observe, the lack of System.Data is pretty much a show-stopper, however in addition WinRT also omits meta-programming support, so the entire core would need to be re-written to use regular (i.e. slow) reflection. There are some elaborate hoops you can jump through to get around this, but without System.Data it seems a lost cause.

Basically, the intent with WinRT (as I understand it) is to consume your data from things like web-services, the classic "smart client" rather than "rich client" model.

So you might consider:

  • server (full .NET)
    • using "dapper" for data-access
    • exposing some call/serialization protocol
  • client (.NET for Windows Store apps, or whatever the term is today)
    • consuming some call/serialization protocol

Strictly speaking, you can IIRC break all the rules and just reference .NET anyway, but that won't pass any MS validation, and won't be a proper metro Windows Store application.



Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Is this KB legal? Yes, learn why