generator-dnn icon indicating copy to clipboard operation
generator-dnn copied to clipboard

Add sample API with basic CRUD functionality

Open ralphwilliams opened this issue 7 years ago • 4 comments

It would be very helpful to have a basic CRUD API and basic db setup to allow the front-end devs a good example of how to get started.

ralphwilliams avatar Jul 19 '18 23:07 ralphwilliams

Great suggestion @ralphwilliams

mtrutledge avatar Jul 20 '18 00:07 mtrutledge

In the SPA template, there is currently a RouteConfig.cs file and a DataController.cs file that registers an API endpoint. However, there are not any CRUD examples at the moment. There are two GET endpoints that show an example of the REST style GET. I will add the Put and Post endpoints as well.

Would you also like to see an example in the View.html / ReactJS app that shows how to call a GET to retrieve an arbitrary value?

mtrutledge avatar Jul 20 '18 21:07 mtrutledge

I think having a basic list example would be nice. The main thing is that it would need to create a db table and perform the functions on that. Just a basic end to end example would be extremely helpful for those of us that know how to manage things on the front end, but need some guidance on the back end part of it. Hope that makes sense.

ralphwilliams avatar Jul 22 '18 16:07 ralphwilliams

On the same front, it'd be super helpful if the SPA templates included some code to save and retreive QuickSettings.

(happy to break this out into a separate issue if necessary)

OllyHodgson avatar Jul 25 '18 11:07 OllyHodgson