slik-dispenser/backend/DispenserContext.cs

19 lines
473 B
C#

using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using backend.Models;
public class DispenserContext : DbContext
{
public DbSet<DispenserLog> DispenserLogs { get; set; }
public DbSet<User> Users { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder options)
{
options.UseSqlite("DataSource=db.sqlite3");
}
}