Ignore:
Timestamp:
08/28/24 21:41:13 (4 weeks ago)
Author:
ElenaMoskova <elena.moskova99@…>
Branches:
main
Children:
a850333
Parents:
118e414
Message:

Use of views

  1. Use of views in VetCenters.
  2. Ability to provide a response to a given response.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • PostgreSqlDotnetCore/Data/ApplicationDbContext.cs

    r118e414 re9bb9d1  
    5050            modelBuilder.Entity<Pet_GaleryClass>().Metadata.SetIsTableExcludedFromMigrations(true);
    5151            modelBuilder.Entity<BlogPostAnswers>().Metadata.SetIsTableExcludedFromMigrations(true);
     52
     53            modelBuilder.Entity<PetDetailsProcedure>().Metadata.SetIsTableExcludedFromMigrations(true);
    5254            //modelBuilder.Entity<PetCareAllData>().Metadata.SetIsTableExcludedFromMigrations(true);
    53            
    5455
    55 
     56            // додадени следните два реда на 28.08
     57            // modelBuilder.Entity<VetCenterWithCity>().HasNoKey(); // Дефинирајте дека VIEW-от нема примарен клуч
     58            // modelBuilder.Entity<VetCenterWithCity>().ToView("vet_centers_with_city"); // Поставете го името на VIEW-от
     59            modelBuilder.Entity<VetCenterWithCity>().HasNoKey().ToView("vet_centers_with_city");
    5660            base.OnModelCreating(modelBuilder);
    5761
     
    6569        public virtual DbSet<UsersClass> CustomerObj { get; set; }
    6670        public virtual DbSet<VetCenter> VetCentersObj { get; set; }
     71       
     72        // додадено на 28.08
     73        public virtual DbSet<VetCenterWithCity> VetCentersWithCity { get; set; }
     74
    6775        public virtual DbSet<BlogPostConsultation> BlogPostControllerObj { get; set; }
    6876        public virtual DbSet<RolesClass> RoleControllerObj { get; set; }
     
    8391        public virtual DbSet<TherapyClass> theraObj { get; set; }
    8492        public virtual DbSet<Type_Of_PetsClass> typeofObj { get; set; }
     93       
     94        public virtual DbSet<PetDetailsProcedure> PetDetailsProcedureObj { get; set; }
     95
     96        //public virtual DbSet<PetDetailsProcedure> AddVetCenter { get; set; }
     97
    8598    }
    8699}
Note: See TracChangeset for help on using the changeset viewer.