24 lines
554 B
C#
24 lines
554 B
C#
using CopyUSB.MyDB.Class;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CopyUSB.MyDB;
|
|
|
|
public class FileInfoDb:DbContext
|
|
{
|
|
public FileInfoDb()
|
|
{
|
|
this.Database.EnsureCreated();
|
|
}
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
/*base.OnConfiguring(optionsBuilder);*/
|
|
optionsBuilder.UseSqlite("Data Source=./fileInfo.db");
|
|
}
|
|
public DbSet<FileInfoTable> Files { get; set; }
|
|
}
|