Migrate to .NET8 GenCycleVDP
Migrate generator to .NET8
This commit is contained in:
23
GenCycleVDP/Db/DbCycle.cs
Normal file
23
GenCycleVDP/Db/DbCycle.cs
Normal 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; }
|
||||
}
|
||||
}
|
23
GenCycleVDP/Db/DbFurnace.cs
Normal file
23
GenCycleVDP/Db/DbFurnace.cs
Normal 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)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user