Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Q : Organization class ...Other changes #2808


User avatar
0
peterlee created

HI~

OrganizationUnit(metadata) in

40 line : public OrganizationUnit(int? tenantId, string displayName, long? parentId = default(long?));

I am switching to ArticleUnit.cs ...

What should I do?

public int? tenantId; public string displayName; public long? parentId = default(long?);

    public ArticleUnit(int? TenantId, string DisplayName, long? ParentId)
    {
        tenantId = TenantId;
        displayName = DisplayName;
        parentId = ParentId;
    }
  1. right?

Also, ApGetRelativeCodependCode, CalculateNextCode, CreateCode, GetLastUnitCode, GetParentCode 2. Is it right for me to code according to the summary instructions?

  1. CreateAsync, MoveAsync It is included in the OrganizationUnitManager ...

How can I solve this?


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

    Hi,

    I couldn't understand your problem very well. Are you trying to create a similar entity named ArticleUnit like OrganizationUnit ?

  • User Avatar
    0
    peterlee created

    right. I want to sort out the car items. Bmw

    • 5 Series
    • 3 Serise Benz
    • 3 Serise
    • 310
    • 310 b .... I want to make the structure like Organization.
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Then I think these definitions are for all tenants, right ? I mean, can each tenant define it's own structure ? If so, you can keep tenantId in your entity, otherwise you can remove it.

    For 2. question, you can also use same approach CalculateNextCode, CreateCode, etc... Because if you do it, it will be very easy to query an item with all childrens.

    For your 3. question, you need to create similar classes like this one <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/master/src/Abp.Zero/Organizations/OrganizationUnitManager.cs">https://github.com/aspnetboilerplate/mo ... Manager.cs</a> and this one <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero/blob/master/src/Abp.Zero/Organizations/OrganizationUnitManagerExtensions.cs">https://github.com/aspnetboilerplate/mo ... ensions.cs</a> for your entity.

  • User Avatar
    0
    peterlee created

    Thank you~!

  • User Avatar
    0
    mikatmlvertti created

    @ismcagdas Hi, I am unable to see links contents. My github profile (MikaTml) is linked to aspnetzero, but not aspnetboilerplate.

  • User Avatar
    0
    hitaspdotnet created

    <cite>MikaTmlVertti: </cite> @ismcagdas Hi, I am unable to see links contents. My github profile (MikaTml) is linked to aspnetzero, but not aspnetboilerplate.

    That repository changed.

    New link to this files

    <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-forsaken/blob/dev/src/Abp.Zero.Common/Organizations/OrganizationUnitManagerExtensions.cs">https://github.com/aspnetboilerplate/mo ... ensions.cs</a>

    <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-forsaken/blob/dev/src/Abp.Zero.Common/Organizations/OrganizationUnitManager.cs">https://github.com/aspnetboilerplate/mo ... Manager.cs</a>

  • User Avatar
    0
    mikatmlvertti created

    <cite>csbeginner: </cite>

    That repository changed.

    New link to this files

    <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-forsaken/blob/dev/src/Abp.Zero.Common/Organizations/OrganizationUnitManagerExtensions.cs">https://github.com/aspnetboilerplate/mo ... ensions.cs</a>

    <a class="postlink" href="https://github.com/aspnetboilerplate/module-zero-forsaken/blob/dev/src/Abp.Zero.Common/Organizations/OrganizationUnitManager.cs">https://github.com/aspnetboilerplate/mo ... Manager.cs</a>

    Thanks!