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
635 B
24 lines
635 B
using System;
|
|
using System.Data.Common;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace EntityFrameworkLib
|
|
{
|
|
public class ChampionContext : DbContext
|
|
{
|
|
public DbSet<ChampionEntity> Champions { get; set; }
|
|
|
|
public ChampionContext () { }
|
|
public ChampionContext(DbContextOptions<ChampionContext> options)
|
|
: base(options) { }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
{
|
|
if (!options.IsConfigured)
|
|
{
|
|
base.OnConfiguring(options.UseSqlite($"DataSource=projet.Champions.db"));
|
|
}
|
|
}
|
|
}
|
|
}
|