© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
5 replies
Avalari

✅ [DDD] Reference IdentityUser in Domain model class

Hi, I'm starting my jurney with DDD so please take it easy on me 😄

Any pointers on how to reference AppUser : IdentityUser (that's in Persistence layer) in a domain model class?
I have some entities that have:
public int OwnerId { get; set; }
public virtual AppUser Owner { get; set; }
public int OwnerId { get; set; }
public virtual AppUser Owner { get; set; }

and I want to use .Include(u => u.Owner) when getting the data using EF Core.

Problem is that AppUser : IdentityUser is defined in the Persistence layer, which Domain Layer has no access to, nor does it have the EF package.
What would be the best approach to deal with this?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

✅ Class instance reference
C#CC# / help
11mo ago
hangfire in DDD
C#CC# / help
11mo ago
Class Libraries Project Reference
C#CC# / help
2y ago