public UnitOfWork(GrowingPlantsContext context)
 {
     UserRepository                = new UserRepository(context);
     TreeRepository                = new TreeRepository(context);
     MeasurementUnitRepository     = new MeasurementUnitRepository(context);
     LightRepository               = new LightRepository(context);
     HumidityRepository            = new HumidityRepository(context);
     TemperatureRepository         = new TemperatureRepository(context);
     FavoriteTreeRepository        = new FavoriteTreeRepository(context);
     CountryRepository             = new CountryRepository(context);
     PlantingProcessRepository     = new PlantingProcessRepository(context);
     PlantingEnvironmentRepository = new PlantingEnvironmentRepository(context);
     ProcessStepRepository         = new ProcessStepRepository(context);
     PlantingActionRepository      = new PlantingActionRepository(context);
     RecurrenceRepository          = new RecurrenceRepository(context);
     NotificationRepository        = new NotificationRepository(context);
     PlantingSpotRepository        = new PlantingSpotRepository(context);
     PlantTypeRepository           = new PlantTypeRepository(context);
     GalleryRepository             = new GalleryRepository(context);
     PictureRepository             = new PictureRepository(context);
 }
 public CountryRepository(GrowingPlantsContext context) : base(context)
 {
 }
 public TreeRepository(GrowingPlantsContext context) : base(context)
 {
 }
 public UserRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #5
0
 public PlantingEnvironmentRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #6
0
 public RecurrenceRepository(GrowingPlantsContext context) : base(context)
 {
 }
 public LightRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #8
0
 public MeasurementUnitRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #9
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory, GrowingPlantsContext context)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
            }

            app.UseRouting();

            app.UseCors("AllowAll");

            app.UseAuthentication();

            app.UseAuthorization();

            app.UseEndpoints(endpoints =>
            {
                endpoints.MapControllers();
            });

            app.UseSwagger();

            app.UseSwaggerUI(c =>
            {
                c.SwaggerEndpoint("/swagger/v1/swagger.json", "GrowingPlants APIs");
            });

            loggerFactory.AddSerilog();
            loggerFactory.AddFile("Logs/log.txt");

            context.Database.Migrate();
        }
Example #10
0
 public NotificationRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #11
0
 public HumidityRepository(GrowingPlantsContext context) : base(context)
 {
 }
 public PlantingActionRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #13
0
 public GalleryRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #14
0
 public TemperatureRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #15
0
 public ProcessStepRepository(GrowingPlantsContext context) : base(context)
 {
 }
 public PictureRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #17
0
 public PlantingSpotRepository(GrowingPlantsContext context) : base(context)
 {
 }
Example #18
0
 protected Repository(GrowingPlantsContext context)
 {
     Context = context;
 }