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


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


            await _dynamicDatasourceRepository.InsertAsync(dynamicDatasource);
        }
        protected virtual async Task Update(CreateOrEditDynamicDatasourceDto input)
        {
            var dynamicDatasource = await _dynamicDatasourceRepository.FirstOrDefaultAsync((int)input.Id);

            ObjectMapper.Map(input, dynamicDatasource);
        }