help choosing a CRUD framework
I am writing a (mostly) CRUD desktop app in C#. My first framework choice was EntityFramework, but I found a couple of issues with it. Most significant was that my Entities don't neatly correspond to tables. Because of access control I had to create views. Delete operations on my views aren't allowed in MySQL so there are stored procs for that. Updates and Inserts are allowed. I found that EF6 [which Microsoft recommends not to use for new projects] would have forced me to create stored procs for all operations. EF Core [which they do recommend for new projects] doesn't support stored procs at all. Besides this basic issue, my app will eventually detach from the database and request everything from a server that will query the DB and apply access control in logic. So the framework I'm looking for should assume that data looks like tables, but not necessarily expect to go to the database to get it.
I found that ADO.NET has the general design that fits these requirements. It has a representation of tables and can use custom adapters to fill the data. It does change tracking. But I find that I have to implement a basic things like ListCollectionView subclasses to have more flexible binding to WPF controls, optimistic concurrency support... Also ADO.NET tables aren't strongly typed and setting/getting fields will result in boxing/unboxing. It doesn't feel right.
If you are still reading this, thank you! The question is whether I'm reinventing the wheel here. Is there a framework that will do CRUD with change tracking and be flexible about the back end? I'm ok paying $2K for commercial products like DevExpress if they save me from writing a custom framework.
0 comments:
Post a Comment