This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Strela.Models;
|
||||
|
||||
namespace Strela.Services
|
||||
{
|
||||
public class SQLiteService: DbContext
|
||||
{
|
||||
public SQLiteService() => Database.EnsureCreated();
|
||||
public virtual DbSet<User> Users { get; set; }
|
||||
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||
{
|
||||
//optionsBuilder.UseNpgsql("Host=172.24.12.201;Port=5432;Database=Notifications;Username=postgres;Password=4NUDZhJ7");
|
||||
optionsBuilder.UseSqlite("Data Source=Services/DataBase.db");
|
||||
}
|
||||
|
||||
//protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
//{
|
||||
// OnModelCreatingPartial(modelBuilder);
|
||||
//}
|
||||
|
||||
//partial void OnModelCreatingPartial(ModelBuilder modelBuilder);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user