﻿using Common.Configuration;
using DAL.Models.Banking;
using DAL.Models.Core;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Text;

namespace DAL.Core.Contexts
{
    public class DataContext : DbContext
    {
        public DataContext()
        {
        }

        public DataContext(DbContextOptions<DataContext> options) : base(options)
        {
        }

        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            optionsBuilder.UseNpgsql(Config.GetConnectionString());
        }

        internal DbSet<User> AuthUsers { get; set; }
        internal DbSet<Transaction> Transactions { get; set; }
    }
}
