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.
24 lines
704 B
24 lines
704 B
using Data.EF.Players;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Model.Games;
|
|
|
|
namespace Data.EF
|
|
{
|
|
public class DiceAppDbContext : DbContext, ILoader
|
|
{
|
|
public virtual GameRunner LoadApp() { throw new NotImplementedException(); }
|
|
|
|
public DbSet<PlayerEntity> Players { get; set; }
|
|
|
|
public DiceAppDbContext() { }
|
|
|
|
public DiceAppDbContext(DbContextOptions<DiceAppDbContext> options)
|
|
: base(options) { }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (!optionsBuilder.IsConfigured) optionsBuilder.UseSqlite("Data Source=EFDice.DiceApp.db").EnableSensitiveDataLogging();
|
|
}
|
|
}
|
|
}
|