Skip to content

Instantly share code, notes, and snippets.

@dkreider
Created March 15, 2021 19:24
Show Gist options
  • Save dkreider/bb1f056e5932d53b820edd47555948d1 to your computer and use it in GitHub Desktop.
Save dkreider/bb1f056e5932d53b820edd47555948d1 to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
using GenericRepositoryDemo.Entities;
using Microsoft.EntityFrameworkCore;
namespace GenericRepositoryDemo
{
public class BloggingContext : DbContext
{
public DbSet<Blog> Blogs { get; set; }
public DbSet<Post> Posts { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder options)
=> options.UseSqlite("Data Source=blogging.db");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment