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.
25 lines
621 B
25 lines
621 B
using Entities;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DbConnectionLibrairie
|
|
{
|
|
public class MyDbContext : DbContext
|
|
{
|
|
public DbSet<AnswerEntity> Answers { get; set; }
|
|
public MyDbContext()
|
|
{ }
|
|
|
|
public MyDbContext(DbContextOptions<MyDbContext> contextOptions) :
|
|
base(contextOptions)
|
|
{ }
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
{
|
|
if (!options.IsConfigured)
|
|
{
|
|
options.UseSqlite(@"Data source = database.db");
|
|
}
|
|
}
|
|
}
|
|
}
|