I tried to organize my MVC project as pleasant, but had problems with naming collisions and wondered if there was a better solution than renaming things into non-logical names.
IE, there is a User class in my Application.Model.Entities namespace.
Then I have Application.Web.Areas.Admin.Models.User, the namespace in which I was going to place all my custom models. This causes a name clash, and when I try to instantiate a User object, it tells me that namespaces are not classes.
I understand why the error occurs, I'm just wondering if there is a better solution than renaming the MVC model folders. (What can I do - I can have ProgramViewModels, ProgramWhateverModels, etc., if necessary). Just curious!
source
share