28 lines
1.0 KiB
C#
28 lines
1.0 KiB
C#
using Microsoft.EntityFrameworkCore;
|
|
using SchoolDatabaseImplement.Models;
|
|
using System.Collections.Generic;
|
|
|
|
namespace SchoolDatabaseImplement
|
|
{
|
|
public class SchoolDatabase : DbContext
|
|
{
|
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
|
{
|
|
if (optionsBuilder.IsConfigured == false)
|
|
{
|
|
optionsBuilder.UseSqlServer(@"Data Source=LAPTOP-5NJEOK79\SQLEXPRESS;Database=SchoolDataBaseFull;Integrated Security=True;MultipleActiveResultSets=True;;TrustServerCertificate=True");
|
|
}
|
|
base.OnConfiguring(optionsBuilder);
|
|
|
|
}
|
|
public virtual DbSet<Client> Clients { set; get; }
|
|
public virtual DbSet<CircleLesson> CircleLessons { set; get; }
|
|
public virtual DbSet<Employee> Employees { set; get; }
|
|
public virtual DbSet<Payment> Payments { set; get; }
|
|
public virtual DbSet<Expense> Expenses { set; get; }
|
|
public virtual DbSet<Circle> Circles { set; get; }
|
|
public virtual DbSet<Lesson> Lessons { set; get; }
|
|
public virtual DbSet<CircleExpense> CircleExpenses { set; get; }
|
|
}
|
|
|
|
} |