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?