PIbd-33_Nevaeva_KA_COP_28/NevaevaLibrary/AccountDatabaseImplement/AccountDatabase.cs
2023-12-01 01:01:22 +04:00

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; }
}
}