Code clean up

This commit is contained in:
retr0volkov
2025-07-10 09:19:06 +03:00 Unverified
parent 2a8f8d2714
commit 915c7a7c5e
36 changed files with 116 additions and 133 deletions
+6 -6
View File
@@ -1,13 +1,13 @@
using Microsoft.EntityFrameworkCore;
using GazpromApp.Models;
using GazpromApp.Models;
using Microsoft.EntityFrameworkCore;
namespace GazpromApp.Utils;
public class AppDbContext : DbContext
{
public DbSet<Models.Image> Image { get; set; }
public DbSet<Image> Image { get; set; }
public DbSet<Equipment> Equipment { get; set; }
public DbSet<Models.Point> Point { get; set; }
public DbSet<Point> Point { get; set; }
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
@@ -20,7 +20,7 @@ public class AppDbContext : DbContext
base.OnModelCreating(modelBuilder);
// Images
modelBuilder.Entity<Models.Point>()
modelBuilder.Entity<Point>()
.HasMany(e => e.Images)
.WithMany(e => e.Points);
@@ -30,7 +30,7 @@ public class AppDbContext : DbContext
.HasForeignKey(e => e.ImageId);
// Properties
modelBuilder.Entity<Models.Point>()
modelBuilder.Entity<Point>()
.HasMany(e => e.Properties)
.WithMany(e => e.Points);