Skip to content

Commit 8106015

Browse files
authored
Merge pull request #17 from anycode-pk/dev
Dev
2 parents 62273a1 + 659cf5a commit 8106015

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

TableBooking.Api/Program.cs

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -180,25 +180,4 @@
180180
app.MapControllers();
181181
app.Run();
182182

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-
}
183+
public partial class Program { }

0 commit comments

Comments
 (0)