Migrate to .NET8 GenCycleVDP

Migrate generator to .NET8
This commit is contained in:
2024-09-19 13:26:06 +03:00
parent 242d4bda3e
commit 9dbd0f39fe
306 changed files with 511 additions and 20041 deletions

23
GenCycleVDP/Db/DbCycle.cs Normal file
View File

@@ -0,0 +1,23 @@
using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
namespace GenCycleVDP.Db
{
[Table("Cycles")]
internal class DbCycle
{
[Column("idCycle"), Required, Key]
public int IdCycle { get; set; }
[Column("numVdp")]
public int NumVdp { get; set; }
[Column("numCycle")]
public int NumCycle { get; set; }
[Column("factStart")]
public DateTime FactStart { get; set; }
[Column("thinkEnd")]
public DateTime ThinkEnd { get; set; }
[Column("factEnd")]
public DateTime FactEnd { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
using System;
using Microsoft.EntityFrameworkCore;
namespace GenCycleVDP.Db
{
internal class DbFurnace : DbContext
{
public DbSet<DbCycle> Cycles { get; set; }
public DbFurnace()
{
Database.EnsureCreated();
}
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseMySql("server=127.0.0.1;user=diplom;password=diplom;database=VDPCycles;", new MySqlServerVersion(new Version(8, 0)));
}
protected override void OnModelCreating(ModelBuilder modelBuilder)
{
}
}
}