I'm a bit stuck on the Onion Architecture.
Say I'm developing an application where a user can register an account, log in and maintain their account(E.G. Change Phone Number).
However, while they are logged in, they can do other application stuff (E.G. Create products, add blog entries, send messages with photos attached etc...)
I'm struggling to define business logic and here is why.
All application services gets saved into a Postgresql
Database.
All User management functions and logging into their account gets handled by LDAP 389 Directory Server
. I will be using the Novell.Directory.Ldap
Package as this will be running on mono and there is no support yet for System.DirectoryServices.Protocols
Both the application database and the Directory server have unique tables.
Do I put both the Application Database Entities and the LDAP Directory Service Models in the App.Domain.Entities?
Technically speaking I have 2 different types of databases with different types of models.
Not entirely sure how to approach this one.
My Solution Structure:
- Domain
- App.Domain.Entities
- App.Domain.Interfaces
- Infrastructure
- App.Infrastructure.Data (FluentNHibernate)
- App.Infrastructure.DependecyResulution (SimpleInjector)
- App.Infrastructure.Interfaces
- App.Infrastructure.Logging (NLog)
- App.Infrastructure.LDAP (Novel.Directory.Ldap)
- Services
- App.Services.Interfaces
- Web
- App.Web.UI (ASP.NET MVC 4 Razor)
I'm pretty sure I'm doing it wrong. Can someone please point me in the right direction with some sort of pseudo example. e.g. Where does the models go etc.
Thank you in advance