initial commit
This commit is contained in:
15
DAL/Database/DatabaseContext.cs
Normal file
15
DAL/Database/DatabaseContext.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user