Jan 15, 2020 03:19 AM|DA924|LINK
Thanks DA924 but the code first stuff is far to complicated for me to understand.
Where do you see any database code being used anywhere in the code I have shown you? I do not believe that DB code of any sort should be used directly in the controller of the MVC UI design pattern. That is not seperation of concerns or seperation of duty
that MVC was created for starting out on the desktop as a UI design pattern so that SoC can be implemented, with MVC being more recently implemented by Web UI solutions and very recently in MS's ASP.NET solutions.
I can only understand database first... That AuthorDM part blows my skull into tiny pieces that leaves a mess in the backseat of car headed to Toluca Lake.
Not even AuthorDM is directly using any database code, which is a domain model object. A domain model object does not directly use DB code.
My goal is to have a simple and repeatable process in place along with the wizards help I can continue to build decent programs for my firm.
Mr. Wizard, huh? :) You said a horrible word there 'Mr. Wizard' IMO that I bring out the holy cross, cringe and puke on that robs any software developer on the basics of how to program effectively in using Object Oriented Programming.
I'll say one more thing. You are right there in the fog of the Twilight Zone where you are aware of the domain, becuase I consider a viewmodel as part of the domain. But on the other hand, you have confused the persistence model/ORM/EF as part of the domain
as it's being directly used by the MVC controller.
It's not your falut, becuase that's what the tutorials for ASP.NET MVC teaches, and Mr. Wizard sends you down the path too.