Browse Source

MyProjectNameDbMigrationService remove unneccessary async

pull/7244/head
Yunus Emre Kalkan 6 years ago
parent
commit
732afa51d5
  1. 6
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs

6
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Domain/Data/MyProjectNameDbMigrationService.cs

@ -41,7 +41,7 @@ namespace MyCompanyName.MyProjectName.Data
{ {
try try
{ {
if (await DbMigrationsProjectExistsAsync() && !await MigrationsFolderExistsAsync()) if (DbMigrationsProjectExists() && !MigrationsFolderExists())
{ {
await AddInitialMigrationAsync(); await AddInitialMigrationAsync();
return; return;
@ -108,14 +108,14 @@ namespace MyCompanyName.MyProjectName.Data
await _dataSeeder.SeedAsync(tenant?.Id); await _dataSeeder.SeedAsync(tenant?.Id);
} }
private async Task<bool> DbMigrationsProjectExistsAsync() private bool DbMigrationsProjectExists()
{ {
var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath(); var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath();
return dbMigrationsProjectFolder != null; return dbMigrationsProjectFolder != null;
} }
private async Task<bool> MigrationsFolderExistsAsync() private bool MigrationsFolderExists()
{ {
var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath(); var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath();

Loading…
Cancel
Save