Following on from this question, I now have the following structure:
Wolfie.Core - Contains business logic & entities, also contains repository interfaces (eg IUserRepository) Classes that need to access the repository are using constructor injection.
Wolfie.Data - References Wolfie.Core and has a UserRepository implementing IUserRepository
So I'm happy with this so far. Core doesn't know anything about data implementation and therefore isn't dependent on anything.
The stumbling block I get to is in my Web layer.
My Web project references my Core project. I can then new up a Core class, say User, but I have to pass a concrete implementation of IUserRepository into it. So I need to reference my Data project in my Web project, which seems wrong. It now also looks like Web is dependent upon Data, which it shouldn't be.
So, how can I inject my Core User class with the Data class withouth directly referencing Data?
Look forward to your help.