diff --git a/backend/Context/DbContext.cs b/backend/cinemateket/Context/DbContext.cs similarity index 100% rename from backend/Context/DbContext.cs rename to backend/cinemateket/Context/DbContext.cs diff --git a/backend/Controllers/MovieController.cs b/backend/cinemateket/Controllers/MovieController.cs similarity index 100% rename from backend/Controllers/MovieController.cs rename to backend/cinemateket/Controllers/MovieController.cs diff --git a/backend/Migrations/20230919073410_V1__init.Designer.cs b/backend/cinemateket/Migrations/20230919073410_V1__init.Designer.cs similarity index 100% rename from backend/Migrations/20230919073410_V1__init.Designer.cs rename to backend/cinemateket/Migrations/20230919073410_V1__init.Designer.cs diff --git a/backend/Migrations/20230919073410_V1__init.cs b/backend/cinemateket/Migrations/20230919073410_V1__init.cs similarity index 100% rename from backend/Migrations/20230919073410_V1__init.cs rename to backend/cinemateket/Migrations/20230919073410_V1__init.cs diff --git a/backend/Migrations/MovieDbContextModelSnapshot.cs b/backend/cinemateket/Migrations/MovieDbContextModelSnapshot.cs similarity index 100% rename from backend/Migrations/MovieDbContextModelSnapshot.cs rename to backend/cinemateket/Migrations/MovieDbContextModelSnapshot.cs diff --git a/backend/Models/Movie.cs b/backend/cinemateket/Models/Movie.cs similarity index 100% rename from backend/Models/Movie.cs rename to backend/cinemateket/Models/Movie.cs diff --git a/backend/Models/MovieResponse.cs b/backend/cinemateket/Models/MovieResponse.cs similarity index 100% rename from backend/Models/MovieResponse.cs rename to backend/cinemateket/Models/MovieResponse.cs diff --git a/backend/Models/db/MovieDB.cs b/backend/cinemateket/Models/db/MovieDB.cs similarity index 100% rename from backend/Models/db/MovieDB.cs rename to backend/cinemateket/Models/db/MovieDB.cs diff --git a/backend/Program.cs b/backend/cinemateket/Program.cs similarity index 95% rename from backend/Program.cs rename to backend/cinemateket/Program.cs index 4744b2d..b7f544f 100644 --- a/backend/Program.cs +++ b/backend/cinemateket/Program.cs @@ -38,14 +38,13 @@ using (var scope = services.CreateScope()) var context = scope.ServiceProvider.GetRequiredService(); context.Database.EnsureCreated(); - using (context) - { - context.Database.Migrate(); - } - // Check if movies are already inserted to avoid duplicate insertion if (!context.Movies.Any()) { + using (context) + { + context.Database.Migrate(); + } using (var reader = new StreamReader("public/DbMockData.csv")) using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture)) { diff --git a/backend/Properties/launchSettings.json b/backend/cinemateket/Properties/launchSettings.json similarity index 100% rename from backend/Properties/launchSettings.json rename to backend/cinemateket/Properties/launchSettings.json diff --git a/backend/Util/Validators.cs b/backend/cinemateket/Util/Validators.cs similarity index 100% rename from backend/Util/Validators.cs rename to backend/cinemateket/Util/Validators.cs diff --git a/backend/appsettings.Development.json b/backend/cinemateket/appsettings.Development.json similarity index 100% rename from backend/appsettings.Development.json rename to backend/cinemateket/appsettings.Development.json diff --git a/backend/appsettings.json b/backend/cinemateket/appsettings.json similarity index 100% rename from backend/appsettings.json rename to backend/cinemateket/appsettings.json diff --git a/backend/backend.csproj b/backend/cinemateket/backend.csproj similarity index 100% rename from backend/backend.csproj rename to backend/cinemateket/backend.csproj diff --git a/backend/public/DbMockData.csv b/backend/cinemateket/public/DbMockData.csv similarity index 100% rename from backend/public/DbMockData.csv rename to backend/cinemateket/public/DbMockData.csv