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


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


            await _inventoryItemRepository.InsertAsync(inventoryItem);
        }
        protected virtual async Task Update(CreateOrEditInventoryItemDto input)
        {
            var inventoryItem = await _inventoryItemRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, inventoryItem);
        }