0

I'm curious if there is a best practice to regenerate a new MVC 4 controller?

What I've done:

  1. Generated the controller BookingController
  2. Realized I need to run a migration to drop an attribute in the Booking model
  3. Wish to update the auto generated BookingController with these changes automatically

Is it just a case of deleting the views and controller and starting again? I'm scared this might, for some reason, not let me generate a new one?

Jamie Street
  • 1,527
  • 3
  • 14
  • 32
  • 1
    Did these changes even affect your controller? – Jeroen Vannevel Dec 01 '13 at 20:31
  • to regenerate template you must hv .tt file in your solution.. this can be achieved by mvcscaffolding see here.. http://stackoverflow.com/questions/8998855/mvc-4-custom-controller-templates . – Vishal Sharma Dec 01 '13 at 20:35
  • 2
    @JeroenVannevel - they shouldn't if the design was truly loosely coupled, thus the up vote. If changing a **property** on a domain model forces a change in a controller template, you're doing it wrong :) – Tommy Dec 01 '13 at 20:41

0 Answers0