prafullbhosale / CustomScaffolder

3 stars 2 forks source link

Explanation for Code. #1

Closed ali-raza-iftikhar closed 7 years ago

ali-raza-iftikhar commented 7 years ago

Hi Can you explain me the CustomeScaffolder.cs and SampleGeneratorModel.cs implementation. I will be very thankful to you. And one more thing. The instructions you have provided for build and model creation run successfully but no model gets generated. :-)

prafullbhosale commented 7 years ago

Hi @ali-raza-iftikhar, the CustomScaffolder in this case doesn't actually do anything. This was intended to demonstrate how a custom scaffolder would get invoked by dotnet-aspnet-codegenerator.

but no model gets generated

Yes, that was intentional, it was only intended to print the passed in model to the console.

I have another sample https://github.com/prafullbhosale/EmptyControllerAndViewScaffolder This repo has a working scaffolder that adds an empty controller and view in a single operation.

https://github.com/prafullbhosale/EmptyControllerAndViewScaffolder/blob/master/EmptyControllerAndViewScaffolder/ControllerAndViewGenerator.cs

Let me know if this sample explains what you are looking for.

ali-raza-iftikhar commented 7 years ago

Thanks that was something i was looking for. :-)