UWP Desktop and Database

0

I am developing an application for business management purposes related to locations. The trivial CRUD, reports, controls etc, commonly developed in windows forms. However, I'm doing a UWP application.

The dilemma begins with the fact that UWP applications can not access ADO.NET classes, so the only way (which I knew) of UWP applications to work with the database is via WebService. The problem is that I'm having a hard time trying to fit the entire data persistence rule into the WebService. I looked for information on how best to do this and found suggestions for creating a service for each entity to be persisted in the database, but I do not find a very practical and "elegant" solution.

I also thought about creating generic CRUD methods that could persist any entity type, that is, a single insert(AnyType anyData) to insert any set of data into its appropriate table. But I could not advance the reasoning, because each entity is very particular. Some have more properties than others, others have properties of type collections ( List , Dictionary ), which will be persisted in separate tables (Example: LOCATION and ITENS_DA_LOCATION), others do not have, some are extremely simple others more complex. Finally, creating a generic CRUD methods is not a simple task.

What other solutions could I try in this case?

    
asked by anonymous 02.03.2017 / 14:23

1 answer

1

In this case, I recommend studying the Entity Framework Core, which can use SQLite databases and whose mapping is fully automatic in simpler scenarios, where each "child" table has only one "parent" table.

If it is necessary for other machines to modify only a "central" database sockets can be used, I recommend using Restup, which basically will transform your app into a REST server, perfect for this kind of case, any doubt just talk.

    
21.05.2017 / 03:48