|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
|
|
namespace CameraCard.Data
|
|
|
|
|
{
|
|
|
|
@ -8,7 +7,12 @@ namespace CameraCard.Data
|
|
|
|
|
public DbSet<User> Users { get; set; }
|
|
|
|
|
public DbSet<Student> Students { get; set; }
|
|
|
|
|
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options) => options.UseSqlite("Data Source=data.db;Password=123456;");
|
|
|
|
|
//SQLitePCLRaw.bundle_e_sqlcipher
|
|
|
|
|
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
|
|
|
|
{
|
|
|
|
|
options.UseSqlite("Data Source=data.db;");
|
|
|
|
|
//options.UseSqlite("Data Source=data.db;Password=123456;");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
|
|
|
@ -25,6 +29,5 @@ namespace CameraCard.Data
|
|
|
|
|
{
|
|
|
|
|
//this.Users.Add(new User { UserName = "admin", Password = "123456" });
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|