We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62273a1 + 659cf5a commit 8106015Copy full SHA for 8106015
TableBooking.Api/Program.cs
@@ -180,25 +180,4 @@
180
app.MapControllers();
181
app.Run();
182
183
-public partial class Program { }
184
-
185
-public static class MigrationExtensions
186
-{
187
- public static void ApplyMigrations(this IHost host)
188
- {
189
- using var scope = host.Services.CreateScope();
190
- var services = scope.ServiceProvider;
191
192
- try
193
194
- var context = services.GetRequiredService<TableBookingContext>();
195
- context.Database.Migrate();
196
- Console.WriteLine("Database migrations applied successfully.");
197
- }
198
- catch (Exception ex)
199
200
- Console.WriteLine($"An error occurred while applying migrations: {ex.Message}");
201
- throw;
202
203
204
-}
+public partial class Program { }
0 commit comments