Statistiques
| Branche: | Révision:

root / GES_PAC / Services / AppDbContext.cs @ 6f451cc1

Historique | Voir | Annoter | Télécharger (1,091 ko)

1
using Microsoft.EntityFrameworkCore;
2
using GES_PAC.Model;
3

    
4
public class AppDbContext : DbContext
5
{
6
    public AppDbContext() { }
7

    
8
    public DbSet<Calibration> Calibration { get; set; }
9
    public DbSet<Comportement> Comportement { get; set; }
10
    public DbSet<Journee> Journee { get; set; }
11
    public DbSet<Lieu> Lieu { get; set; }
12
    public DbSet<Mesure> Mesure { get; set; }
13
    public DbSet<MesureCalibration> MesureCalibration { get; set; }
14
    public DbSet<Personne> Personne { get; set; }
15
    public DbSet<PhaseCalibration> PhaseCalibration { get; set; }
16
    public DbSet<Serie> Serie { get; set; }
17
    public DbSet<SerieAnimal> SerieAnimal { get; set; }
18
    public DbSet<TypeCalibration> TypeCalibration { get; set; }
19
    public DbSet<TypeComportement> TypeComportement { get; set; }
20

    
21
    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
22
    {
23
        string dbPath = Path.Combine(FileSystem.AppDataDirectory, "GES_PAC.db3");
24
        optionsBuilder.UseSqlite($"Filename={dbPath}");
25
    }
26

    
27
    protected override void OnModelCreating(ModelBuilder modelBuilder)
28
    {
29

    
30
    }
31
}