15 lines
366 B
C#
15 lines
366 B
C#
using Domain.Models;
|
|
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace DAL.Database;
|
|
|
|
public class DatabaseContext: DbContext
|
|
{
|
|
public DbSet<Product> Products { get; set; }
|
|
public DbSet<Description> Descriptions { get; set; }
|
|
|
|
public DatabaseContext(DbContextOptions<DatabaseContext> options) : base(options)
|
|
{
|
|
Database.EnsureCreated();
|
|
}
|
|
} |