PIbd-33_Abazov_A.A._KOP_29/AbazovApp/AccountsDataBaseImplement/AccountsDatabase.cs

20 lines
621 B
C#
Raw Normal View History

2023-11-16 20:39:00 +04:00
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; }
}
}