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

Different signatures of similar methods #956


User avatar
0
easyest created

In ITenantAppService there are methods, that do not have return value:

Task CreateTenant(CreateTenantInput input);
        Task UpdateTenant(TenantEditDto input);

But in IOrganizationUnitAppService the same methods do have a return value:

Task<OrganizationUnitDto> CreateOrganizationUnit(CreateOrganizationUnitInput input);
        Task<OrganizationUnitDto> UpdateOrganizationUnit(UpdateOrganizationUnitInput input);

I do no see any difference in usage of those methods from angular. Could You explain, why they are different?


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

    There is a difference on usage. For organization unit, we are using return value of update/create method to update it on the organization tree.

    You can see it in createOrEditUnitModal.js:

    organizationUnitService
        .createOrganizationUnit(vm.organizationUnit)
        .success(function(result) {
            abp.notify.info(app.localize('SavedSuccessfully'));
            $uibModalInstance.close(result);
        });
    

    It returns the result back to the main page (index.js). And the main page updates the tree (See vm.organizationTree.addUnit function for details)