You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
545 B
22 lines
545 B
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DataBase
|
|
{
|
|
public class PongDbContext : DbContext
|
|
{
|
|
public PongDbContext() { }
|
|
public PongDbContext(DbContextOptions<PongDbContext> options) : base(options) { }
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
//base.OnConfiguring(optionsBuilder);
|
|
|
|
if (!optionsBuilder.IsConfigured)
|
|
{
|
|
optionsBuilder.UseSqlite($"Data Source=PongDB.db");
|
|
}
|
|
}
|
|
}
|
|
}
|