|
|
|
|
@ -0,0 +1,27 @@
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
|
|
|
|
|
|
|
|
|
namespace SmartAquaViewer.DataAnalisys
|
|
|
|
|
{
|
|
|
|
|
public class AppDbContext : DbContext
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
//dotnet ef migrations add InitialCreate
|
|
|
|
|
//dotnet ef database update
|
|
|
|
|
|
|
|
|
|
//dotnet ef migrations add AddMultipleTables
|
|
|
|
|
//dotnet ef database update
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public DbSet<WaterQualityVO> WaterQualities { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
|
|
|
{
|
|
|
|
|
// SQL Server 예시 (필요에 맞게 변경)
|
|
|
|
|
optionsBuilder.UseSqlServer(
|
|
|
|
|
"Server=localhost;Database=SmartAquaDB;Trusted_Connection=True;TrustServerCertificate=True;");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|