Adding ApplicationUser as Navigation Property to entities #127
-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi, ApplicationUser inherits from IdentityUser, which again has a dependency on Microsoft.AspNetCore.Identity package. If we were to add the ApplicationUser to Domain / Core Projects, this would add an additional dependency to the Core Layer which is not desirable. Here, ApplicationUser cannot be treated as an entity. Instead, we have an adapted class / dto named as UserDetailsDto. ApplicationUser is more of a secured model and should not be used as Navigation Property. |
Beta Was this translation helpful? Give feedback.
Hi,
ApplicationUser inherits from IdentityUser, which again has a dependency on Microsoft.AspNetCore.Identity package. If we were to add the ApplicationUser to Domain / Core Projects, this would add an additional dependency to the Core Layer which is not desirable. Here, ApplicationUser cannot be treated as an entity.
Instead, we have an adapted class / dto named as UserDetailsDto.
ApplicationUser is more of a secured model and should not be used as Navigation Property.