Hi, I'm trying to build a multi-service program. If your service user's has different entity property and roles in each service:
- How can you manage authorizations with multiple tenants?
- How can you store their entity in DB out of AbpUsers?
Example: We have two services named Commerce and LMS(Learning Management System) , Users naming Customer for Commerce service and Student for LMS. So their have own properties like Shopping cart items, addresses for customers or Courses, Tests for students.
What is the best way to implement this scenario? :!: :?: :? Thank you for any kind of help. ;) :(
4 Answer(s)
-
0
You can use Table-Per-Hierarchy inheritance for AbpUser. Implement IHaveTest for both entities.
class Customer : AbpUser, IHaveTest {} class Student : AbpUser, IHaveTest {}
<a class="postlink" href="https://weblogs.asp.net/manavi/inheritance-mapping-strategies-with-entity-framework-code-first-ctp5-part-1-table-per-hierarchy-tph">https://weblogs.asp.net/manavi/inherita ... rarchy-tph</a>
-
0
<cite>alper: </cite> You can use Table-Per-Hierarchy inheritance for AbpUser. Implement IHaveTest for both entities.
class Customer : AbpUser, IHaveTest {} class Student : AbpUser, IHaveTest {}
<a class="postlink" href="https://weblogs.asp.net/manavi/inheritance-mapping-strategies-with-entity-framework-code-first-ctp5-part-1-table-per-hierarchy-tph">https://weblogs.asp.net/manavi/inherita ... rarchy-tph</a>
Thank you Mr. Alper for this reply and helpful article. What's IHaveTest and why I need to implement that?
-
0
Actually you don't need to implement IHaveTest. I misunderstood your Tests for students. Ignore it.
-
0
<cite>alper: </cite> Actually you don't need to implement IHaveTest. I misunderstood your Tests for students. Ignore it.
My English is bad, very bad, I know :D Sir Thank you again