using DataModels;
using Microsoft.EntityFrameworkCore;
namespace webapp_codedocu.Data
{
public class ApplicationDbContext : DbContext
{
public ApplicationDbContext(DbContextOptions
options) : base(options) { }
#region Datasets
//--<
Datasets in this Project >--
public virtual
DbSet<ArticleDbModel> tbl_Articles { get; set; }
//--</
Datasets in this Project >---
#endregion /Datasets
protected override void
OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
//------------< region: Datase-Tables
to Models >------------
//*zuweisen der Model-Klasse zur Sql-Server Tabelle
modelBuilder.Entity<ArticleDbModel>().ToTable("tbl_Articles");
//------------</ region :
Datase-Tables to Models >------------
}
}
}
//protected override void
OnModelCreating(ModelBuilder builder)
//{
// base.OnModelCreating(builder);
//}
|