blazor-calendar/BlazorApp/MyContext.cs

16 lines
388 B
C#

using Microsoft.EntityFrameworkCore;
namespace BlazorApp
{
public class MyContext : DbContext
{
public DbSet<Data.Calendar> Calendars { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
base.OnConfiguring(optionsBuilder);
optionsBuilder.UseSqlite("Filename=App.db");
}
}
}