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) { }
public PlantingEnvironmentRepository(GrowingPlantsContext context) : base(context) { }
public RecurrenceRepository(GrowingPlantsContext context) : base(context) { }
public LightRepository(GrowingPlantsContext context) : base(context) { }
public MeasurementUnitRepository(GrowingPlantsContext context) : base(context) { }
// 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(); }
public NotificationRepository(GrowingPlantsContext context) : base(context) { }
public HumidityRepository(GrowingPlantsContext context) : base(context) { }
public PlantingActionRepository(GrowingPlantsContext context) : base(context) { }
public GalleryRepository(GrowingPlantsContext context) : base(context) { }
public TemperatureRepository(GrowingPlantsContext context) : base(context) { }
public ProcessStepRepository(GrowingPlantsContext context) : base(context) { }
public PictureRepository(GrowingPlantsContext context) : base(context) { }
public PlantingSpotRepository(GrowingPlantsContext context) : base(context) { }
protected Repository(GrowingPlantsContext context) { Context = context; }