Base solution for your next web application
Open Closed

Mapping interfaced properties #2066


User avatar
0
worthyvii created

Hello.

How can I map things using the fluent Api in a similar way to CreatedUserId on the ICreationAudited interface.

I want to attach an interface, and have it automatically create the foreign key link in the database. How did you guys accomplish this? I cannot see it in the code


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can see it here <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/a08338ea8b8abd8d90ee6e83a4ca43256d3705ea/src/Abp.Zero/Authorization/Users/AbpUser.cs#L186">https://github.com/aspnetboilerplate/mo ... er.cs#L186</a>.

    AbpUserBase has a virtual property for CreatorUser. You can do the same, EF will handle it.