Initial COmmit
This commit is contained in:
38
KanSan/Model.cs
Normal file
38
KanSan/Model.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace KanSan
|
||||
{
|
||||
public class KanSanContext : DbContext
|
||||
{
|
||||
|
||||
public DbSet<Kunden> Kunden { get; set; }
|
||||
public DbSet<Leistungsverzeichniss> Leistungsverzeichnisses { get; set; }
|
||||
public DbSet<LeistungsverzeichnisBaustelle> leistungsverzeichnisBaustelle { get; set; }
|
||||
public DbSet<Baustelle> Baustellen { get; set; }
|
||||
|
||||
protected override void OnConfiguring(DbContextOptionsBuilder options)
|
||||
{
|
||||
options.UseSqlite("Data Source=kanSan.db");
|
||||
//options.UseNpgsql("Host=localhost;Database=kanSan;Username=user;Password=pass");
|
||||
}
|
||||
|
||||
/*
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<LeistungsverzeichnisBaustelle>(eb =>
|
||||
{
|
||||
eb.HasNoKey();
|
||||
});
|
||||
}
|
||||
*/
|
||||
}
|
||||
class Model
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user