Ejemplo n.º 1
0
        public NorthwindUnitOfWork(string connectionString)
        {
            Customers    = new CustomersRepository(connectionString);
            Orders       = new OrdersRepository(connectionString);
            OrderDetails = new OrderDetailsRepository(connectionString);
            Users        = new UserRepository(connectionString);
            Products     = new ProductsRepository(connectionString);
            Suppliers    = new SuppliersRepository(connectionString);

            Clientes     = new ClientesRepository(connectionString);
            Contratistas = new ContratistasRepository(connectionString);
            Contratos    = new ContratosRepository(connectionString);
            Lugares      = new LugaresRepository(connectionString);
            Servicios    = new ServiciosRepository(connectionString);
        }
Ejemplo n.º 2
0
 public LugaresController(PlatziSquareDbContext context)
 {
     _context          = context;
     lugaresRepository = new LugaresRepository(_context);
 }