Georgy.Khatuncev
b5688b9b94
Move classes for work with DB in root dir. Fix problems with num cycles, after change to Enum
25 lines
775 B
C#
25 lines
775 B
C#
using System;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DbCycleVDP
|
|
{
|
|
public class DbFurnace : DbContext
|
|
{
|
|
public DbSet<TableCycle> 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)));
|
|
optionsBuilder.UseMySql("server=37.79.216.218;user=mytest;password=mytest;database=VDPCycles;", new MySqlServerVersion(new Version(8, 0)));
|
|
}
|
|
|
|
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|