What is the recommended folder structure for a IoC C# project? For a MVVM project, the standard is to create folders named Views and ViewModels (and where do you put interfaces and unit testing classes?)
What about a DLL project, that has no views, but exposes many classes to be created via IoC, which folders should be in my project?
Also as I'm starting to refactor code into IoC, I'm running into issues with the SettingsFile class that contains data that is serialized into a file. It contains a few methods:
The main issue is with Load, as deserializing the object creates a new hard instance of the class, bypassing the principles of IoC. What's the right way of handling the scenario?
I'm thinking of moving all code outside of that class so that this class is only responsible for being serialized/deserialized without any code, and then excluding it from IoC. Is this the right thing to do? It's a similar problem when using Entity Framework and using any auto-generated table classes.
Thanks
The answer is to separate data classes from behavior classes. SettingsFile, as well as any EntityFramework class, contain purely data. Dependency Injection via IoC applies only to behaviors classes.