123456789101112131415161718192021222324252627282930313233343536 |
- using Backend.Data.Interfaces;
- using Microsoft.AspNet.Identity.EntityFramework;
- using Microsoft.AspNetCore.Http;
- using Microsoft.AspNetCore.Identity;
- using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore;
- using Microsoft.EntityFrameworkCore.Infrastructure;
- using System;
- using System.Collections.Generic;
- using System.Text;
- using System.Threading;
- using System.Threading.Tasks;
-
- namespace Backend.Data.Config
- {
- public class ApplicationDatabaseContext : DbContext,IApplicationDatabaseContext
- {
- public ApplicationDatabaseContext(DbContextOptions<ApplicationDatabaseContext> options) : base(options)
- {
- }
- protected override void OnModelCreating(ModelBuilder builder)
- {
- base.OnModelCreating(builder);
- }
- public DbSet<Produit> Produits { get; set; }
- public DbSet<Propriete> Proprietes { get; set; }
- public DbSet<TypePropriete> TypeProprietes { get; set; }
- public DbSet<Commande> Commandes { get; set; }
- public DbSet<LigneCommande> LigneCommandes { get; set; }
-
- public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
- {
- return await base.SaveChangesAsync(cancellationToken);
- }
- }
- }
|