public UnitOfWork(AreasMapCoreDbContext context) { _context = context ?? throw new ArgumentNullException(nameof(context)); EntityFrameworkManager.ContextFactory = context => { return(_context); }; AreaRepository = new AreaRepository(_context); ShapeRepository = new ShapeRepository(_context); ShapeTypeRepository = new ShapeTypeRepository(_context); CircleRepository = new CircleRepository(_context); CircleCoordinateRepository = new CircleCoordinateRepository(_context); RectangleRepository = new RectangleRepository(_context); RectangleBoundsRepository = new RectangleBoundsRepository(_context); PolygonRepository = new PolygonRepository(_context); PolygonCoordinateRepository = new PolygonCoordinateRepository(_context); }
public CircleCoordinateRepository(AreasMapCoreDbContext context) : base(context) { }
public ShapeRepository(AreasMapCoreDbContext context) : base(context) { }
public RectangleRepository(AreasMapCoreDbContext context) : base(context) { }
public PolygonRepository(AreasMapCoreDbContext context) : base(context) { }
public PolygonCoordinateRepository(AreasMapCoreDbContext context) : base(context) { }
public Repository(AreasMapCoreDbContext context) { Context = context; }