2025-11-11 14:30:29 +08:00

40 lines
1.1 KiB
C#

using AiSportsMicrospaceDB.Entities;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AiSportsMicrospaceDB.DBContext
{
public class AppDbContext : DbContext
{
public AppDbContext(DbContextOptions<AppDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
modelBuilder.Entity<SixGroupPoints>().HasData(
new SixGroupPoints
{
Id = 1,
points = [
(0.21, 0.88 ),
(0.36, 0.58 ),
(0.50, 0.88),
(0.64, 0.58 ),
(0.78, 0.88),
(0.92, 0.58 )
]
});
}
public DbSet<BasicConfig> BasicConfig { get; set; }
public DbSet<SixGroupPoints> SixGroupPoints { get; set; }
}
}