Reputation: 3160
I created a multi-layer project, structured like this
I have an Entity in the Domain-Layer called 'Domain'. It represents an internet domain, as the project is a kind of a "Domain-Management-Software" I struggled finding a better name for that entity...
Now what I've got is a "type name expected but namespace found"-Error in Visual Studio. The best way I've found so far, to get rid of the error, is to prefix the Entity with its namespace. So creating a new instance looks like this:
var domain = new Domain.Entities.Domain();
Is this the way to go, or do you know a more elegant solution?
Upvotes: 1
Views: 1179
Reputation: 15404
You'll avoid a lot of confusion down the road if you change either one of those terms. If you're writing code for human beings to read as well as for machines to read, you should be concerned about the ambiguity that giving the same name to 2 related parts of your system would induce.
I'd call the Entity InternetDomain or (better yet, and) call the namespace DomainModel.
Upvotes: 4