QlbrcDbContext.cs 933 B

12345678910111213141516171819202122232425262728293031323334
  1. using Microsoft.EntityFrameworkCore;
  2. using Quadarax.Application.QLiberace.Base.Entities;
  3. namespace Quadarax.Application.QLiberace.Base
  4. {
  5. public class QlbrcDbContext : DbContext
  6. {
  7. #region *** Mapped entities ***
  8. public DbSet<User> Users { get; set; }
  9. public DbSet<Tenant> Tenants { get; set; }
  10. public DbSet<Setting> Settings { get; set; }
  11. #endregion
  12. #region *** Constructors ***
  13. public QlbrcDbContext() : base()
  14. {
  15. }
  16. public QlbrcDbContext(DbContextOptions options) : base(options)
  17. {
  18. }
  19. #endregion
  20. protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  21. {
  22. optionsBuilder.UseSqlServer(@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=QLiberace;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False");
  23. }
  24. }
  25. }