Code clean up
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user