20 lines
631 B
C#
20 lines
631 B
C#
using AccountDatabaseImplement.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace AccountDatabaseImplement
|
|
{
|
|
public class AccountDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
=> optionsBuilder.UseNpgsql("Host=localhost;Database=AccountsDB;Username=postgres;Password=1234");
|
|
public virtual DbSet<Role> Roles { set; get; }
|
|
public virtual DbSet<Account> Accounts { set; get; }
|
|
}
|
|
}
|