Açıklama Yok

ApplicationDatabaseContext.cs 1.0KB

1234567891011121314151617181920212223242526272829
  1. using Backend.ApplicationCore.Interfaces.IRepositories;
  2. using Backend.Domain.Entities;
  3. using Microsoft.EntityFrameworkCore;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace Backend.Persistence.Config
  7. {
  8. public class ApplicationDatabaseContext : DbContext,IApplicationDatabaseContext
  9. {
  10. public ApplicationDatabaseContext(DbContextOptions<ApplicationDatabaseContext> options) : base(options)
  11. {
  12. }
  13. protected override void OnModelCreating(ModelBuilder builder)
  14. {
  15. base.OnModelCreating(builder);
  16. }
  17. public DbSet<Produit> Produits { get; set; }
  18. public DbSet<Propriete> Proprietes { get; set; }
  19. public DbSet<TypePropriete> TypeProprietes { get; set; }
  20. public DbSet<Commande> Commandes { get; set; }
  21. public DbSet<LigneCommande> LigneCommandes { get; set; }
  22. public override async Task<int> SaveChangesAsync(CancellationToken cancellationToken = default)
  23. {
  24. return await base.SaveChangesAsync(cancellationToken);
  25. }
  26. }
  27. }

Powered by TurnKey Linux.