diff --git a/asg_form/Controllers/Budget/BgCountController.cs b/asg_form/Controllers/Budget/BgCountController.cs index 2b5d292..8f77230 100644 --- a/asg_form/Controllers/Budget/BgCountController.cs +++ b/asg_form/Controllers/Budget/BgCountController.cs @@ -1,4 +1,4 @@ -using asg_form.Controllers.Teamregistration; +/*using asg_form.Controllers.Teamregistration; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Mvc; @@ -91,3 +91,4 @@ namespace asg_form.Controllers.Budget } } } +*/ \ No newline at end of file diff --git a/asg_form/Controllers/Dbset.cs b/asg_form/Controllers/Dbset.cs index c0a8f9e..90d5949 100644 --- a/asg_form/Controllers/Dbset.cs +++ b/asg_form/Controllers/Dbset.cs @@ -1,5 +1,5 @@  -using asg_form.Controllers.Budget; +//using asg_form.Controllers.Budget; using asg_form.Controllers.Store; using asg_form.Controllers.Team; using asg_form.Controllers.Teamregistration; @@ -240,12 +240,12 @@ namespace asg_form.Controllers public DbSet T_config { get; set; } public DbSet T_Task { get; set; } public DbSet T_Comform { get; set; } - public DbSet budgetDetails { get; set; } + //public DbSet budgetDetails { get; set; } protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { - string connStr = @"Server=localhost\SQLEXPRESS;Database=master;Trusted_Connection=True;TrustServerCertificate=true"; - optionsBuilder.UseSqlServer(connStr); + string connStr = @"Host=localhost;Port=2345;Database=postgres;Username=postgres;Password=luolan12323;"; + optionsBuilder.UseNpgsql(connStr); } protected override void OnModelCreating(ModelBuilder modelBuilder) diff --git a/asg_form/Program.cs b/asg_form/Program.cs index 5429906..0232e5a 100644 --- a/asg_form/Program.cs +++ b/asg_form/Program.cs @@ -8,6 +8,7 @@ using Microsoft.AspNetCore.Mvc; using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.FileProviders; using Microsoft.Extensions.Hosting; +using Microsoft.Extensions.Options; using Microsoft.IdentityModel.Tokens; using Microsoft.OpenApi.Models; using Mirai.Net.Sessions; @@ -80,8 +81,8 @@ IServiceCollection services = builder.Services; services.AddDbContext(opt => { - string connStr = @"Server=localhost\SQLEXPRESS;Database=master;Trusted_Connection=True;TrustServerCertificate=true"; - opt.UseSqlServer(connStr); + string connStr = @"Host=localhost;Port=2345;Database=postgres;Username=postgres;Password=luolan12323;"; + opt.UseNpgsql(connStr); }); services.AddHostedService(); diff --git a/asg_form/asg_form.csproj b/asg_form/asg_form.csproj index 12f488a..9054eaf 100644 --- a/asg_form/asg_form.csproj +++ b/asg_form/asg_form.csproj @@ -27,7 +27,7 @@ - + @@ -48,12 +48,13 @@ + - +