PIbd-33_Abazov_A.A._KOP_29/AbazovApp/AccountsDataBaseImplement/AccountsDatabase.cs
2023-11-16 20:39:00 +04:00

21 lines
698 B
C#

using AccountsDataBaseImplement.Models;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace AccountsDataBaseImplement
{
public class AccountsDatabase : DbContext
{
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
=> optionsBuilder.UseNpgsql("Host=localhost;Database=AccountsDB;Username=postgres;Password=postgres");
public virtual DbSet<Account> Accounts { set; get; }
public virtual DbSet<Interest> Interests { set; get; }
public virtual DbSet<AccountInterest> AccountInterests { set; get; }
}
}