DbContext implementation for Location entities with a Sqlite database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.EntityFrameworkCore; | |
using LocPoc.Contracts; | |
namespace LocPoc.Repository.Sqlite | |
{ | |
public class SqliteContext: DbContext | |
{ | |
public SqliteContext(DbContextOptions<SqliteContext> options) : base(options) | |
{ | |
} | |
public DbSet<Location> Locations { get; set; } | |
protected override void OnConfiguring(DbContextOptionsBuilder options) | |
=> options.UseSqlite("Data Source=locpoc.db"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment