bitget asp 서버 추가

This commit is contained in:
DESKTOP-F6681KC\llk
2024-06-02 19:32:08 +09:00
parent 4db5a85e55
commit 1be2f7c5a7
15 changed files with 345 additions and 1 deletions

27
Bitget_Server/Program.cs Normal file
View File

@@ -0,0 +1,27 @@
using Bitget_Server.EFCore;
using Microsoft.EntityFrameworkCore;
namespace Bitget_Server
{
public class Program
{
public static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddDbContext<BitgetContext>();
var app = builder.Build();
using (var scope = app.Services.CreateScope())
{
var services = scope.ServiceProvider;
var context = services.GetRequiredService<BitgetContext>();
context.Database.Migrate();
}
app.MapGet("/", () => "Hello World!");
app.Run();
}
}
}