0

Back when I was first learning MVC Microsoft provided an amazing experience with scaffolding. Provide a model and it would create a set of CRUD views and actions for you with zero effort related to just that model. Now it appears that the ONLY option is to use Entity Framework to get the same CRUD scaffolding. Is there a way to do this without having to use EF? We don't use and I don't want to, but I still want to rapidly output a set of views based on a model I'm creating. I am then going to wire up the controller to a set of web services rather than EF. I don't want EF anywhere in my web layer.

akousmata
  • 1,005
  • 14
  • 34
  • 1
    Right click your controllers folder and choose "Add" > "New scaffold item" > "Web API 2 Controller - Empty" or "MVC 5 View". – Steve Greene Apr 30 '18 at 20:16
  • Oh wow thanks a ton! I was attempting to do this while adding a new controller rather than just a view. What a simple oversight. – akousmata May 04 '18 at 16:28
  • Web API 2 controller - empty does not give you the option to select a model. – akousmata May 04 '18 at 16:32
  • Actually, upon further review, this doesn't do exactly what I'm asking. I want the controller with CRUD operations based on a model and all of the associated views for those without EF. I'm convinced at this point that this is not an option without writing one's own templates. Why MS took this away or didn't just make EF optional, I'll never understand. Thanks for the reply though. – akousmata May 04 '18 at 16:36
  • Personally, I haven't scaffolded in a long time. I have enough existing code to model after. Or I can come out here and find good code to steal :) – Steve Greene May 04 '18 at 18:15

0 Answers0