Example #1
0
        public async Task DeleteAsync()
        {
            var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme"));

            await _tenantAppService.DeleteAsync(acme.Id).ConfigureAwait(false);

            UsingDbContext(dbContext =>
            {
                dbContext.Tenants.Any(t => t.Id == acme.Id).ShouldBeFalse();
            });
        }
Example #2
0
        public async Task DeleteTenant_Test()
        {
            CreateTenantDto dto = new CreateTenantDto()
            {
                TenancyName      = "TestTenant",
                Name             = "TestTenant",
                AdminPhoneNumber = "13851400000",
                IsActive         = true
            };
            var createResult = await _tenantAppService.CreateAsync(dto);

            await _tenantAppService.DeleteAsync(new EntityDto <int>(createResult.Id));

            await UsingDbContextAsync(async context =>
            {
                var testTenant       = await context.Tenants.FirstOrDefaultAsync(u => u.TenancyName == dto.TenancyName);
                testTenant.IsDeleted = true;
            });
        }
 public Task DeleteAsync(Guid id)
 {
     return(_service.DeleteAsync(id));
 }
 public async Task DeleteAsync(Guid id)
 {
     await _tenantAppService.DeleteAsync(id);
 }
Example #5
0
 public Task DeleteAsync(string id)
 {
     return(_tenantAppService.DeleteAsync(id.ToGuid()));
 }
 public Task DeleteTenantAsync(EntityDto <int> input)
 {
     return(_tenantAppService.DeleteAsync(input));
 }