public async Task CreateOrEdit(CreateOrEditAssetPartStatusDto input)
 {
     if (input.Id == null)
     {
         await Create(input);
     }
     else
     {
         await Update(input);
     }
 }
        protected virtual async Task Create(CreateOrEditAssetPartStatusDto input)
        {
            var assetPartStatus = ObjectMapper.Map <AssetPartStatus>(input);


            if (AbpSession.TenantId != null)
            {
                assetPartStatus.TenantId = (int?)AbpSession.TenantId;
            }


            await _assetPartStatusRepository.InsertAsync(assetPartStatus);
        }
        protected virtual async Task Update(CreateOrEditAssetPartStatusDto input)
        {
            var assetPartStatus = await _assetPartStatusRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, assetPartStatus);
        }