public async Task UpdateAsync() { var acme = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Name == "acme")); var result = await _tenantAppService.UpdateAsync(acme.Id, new TenantUpdateDto { Name = "acme-renamed" }).ConfigureAwait(false); result.Id.ShouldBe(acme.Id); result.Name.ShouldBe("acme-renamed"); var acmeUpdated = UsingDbContext(dbContext => dbContext.Tenants.Single(t => t.Id == acme.Id)); acmeUpdated.Name.ShouldBe("acme-renamed"); }
public async Task UpdateTenant_Test() { CreateTenantDto dto = new CreateTenantDto() { TenancyName = "TestTenant", Name = "TestTenant", AdminPhoneNumber = "13851400000", IsActive = true }; var createResult = await _tenantAppService.CreateAsync(dto); createResult.Name = "NewTenant"; createResult.Contact = "ContactName"; createResult.Address = "TestAddress"; createResult.Logo = "LogoUrl"; var updateResult = await _tenantAppService.UpdateAsync(createResult); await UsingDbContextAsync(async context => { var testTenant = await context.Tenants.FirstOrDefaultAsync(u => u.TenancyName == dto.TenancyName); testTenant.Name.ShouldBe("NewTenant"); testTenant.Contact.ShouldBe("ContactName"); testTenant.Address.ShouldBe("TestAddress"); testTenant.Logo.ShouldBe("LogoUrl"); }); }
public Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input) { return(_service.UpdateAsync(id, input)); }
public async Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input) { return(await _tenantAppService.UpdateAsync(id, input)); }
public Task <TenantDto> UpdateAsync(string id, TenantUpdateDto input) { return(_tenantAppService.UpdateAsync(id.ToGuid(), input)); }
public Task <TenantDto> UpdateTenantAsync(TenantDto input) { return(_tenantAppService.UpdateAsync(input)); }