APICycleVDP/DbCycleVDP/DbFurnace.cs

25 lines
775 B
C#
Raw Normal View History

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)
{
}
}
}