1

I have new requirements for a ASP.Net MVC system that is up and running but unfortunetly it is not well designed (e.g. database is accessed directly from controllers and from within the views sometimes).

So i proposed a new domain-driven architecture to the system and we will start migrating from the old system to the new architecture by modules and functions.

But i am facing a problem, i need to share the different layouts between the two systems, any ideas on how to do this?

Generally,any best practices for scenarios like this?

Thanks in advance.

Khaled
  • 841
  • 3
  • 13
  • 22
  • Are there just too many layouts or too complex layouts to simply copy them to the new system? – Andy T Sep 27 '16 at 16:56
  • I tried to do so, but unfortunately there is a database code written in these layout! to access the rules and build the menus. plus there are multiple layouts! – Khaled Sep 27 '16 at 17:23

1 Answers1

0

I've previously migrated a site away from using ViewBag to use strongly-typed views. This included a strongly-typed _layout page.

I had to create the "correct" _layout page from a copy of the original and clean it up. Then I migrated one controller/view at a time until I was able to remove the old views.

Andy T
  • 10,223
  • 5
  • 53
  • 95