vassago/Models/ChattingContext.cs

22 lines
881 B
C#
Raw Normal View History

2023-06-01 00:03:23 -04:00
namespace vassago.Models;
2023-06-05 14:55:48 -04:00
using Microsoft.Extensions.Configuration;
2023-06-01 00:03:23 -04:00
using Microsoft.EntityFrameworkCore;
public class ChattingContext : DbContext
{
public DbSet<Attachment> Attachments { get; set; }
public DbSet<Channel> Channels { get; set; }
//public DbSet<Emoji> Emoji {get;set;}
public DbSet<Message> Messages { get; set; }
public DbSet<Account> Accounts { get; set; }
public DbSet<User> Users { get; set; }
2023-06-01 00:03:23 -04:00
2023-07-04 20:40:37 -04:00
public ChattingContext(DbContextOptions<ChattingContext> options) : base(options) { }
public ChattingContext() : base() { }
2023-06-01 00:03:23 -04:00
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.UseNpgsql(Shared.DBConnectionString);
//.EnableSensitiveDataLogging(true); //"sensitive" is one thing. writing "did something" every time you think a thought is a different thing.
}
2023-06-01 00:03:23 -04:00
}