mtrutledge / generator-dnn

Yeoman generator to scaffold DNN / DotNetNuke Modules and Themes.
MIT License
17 stars 10 forks source link

Add sample API with basic CRUD functionality #31

Open ralphwilliams opened 6 years ago

ralphwilliams commented 6 years ago

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.

mtrutledge commented 6 years ago

Great suggestion @ralphwilliams

mtrutledge commented 6 years ago

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?

ralphwilliams commented 6 years ago

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.

OllyHodgson commented 5 years ago

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)