Ejemplo n.º 1
0
        public RestaurantUnitOfWork(string connectionString = null)
        {
            if (connectionString == null)
            {
                _context = new RestaurantContext(ConnectionStringInfo.Get());
            }
            else
            {
                _context = new RestaurantContext(connectionString);
            }

            UrunDal             = new UrunDal(_context);
            TanimDal            = new TanimDal(_context);
            PorsiyonDal         = new PorsiyonDal(_context);
            EkMalzemeDal        = new EkMalzemeDal(_context);
            MusteriDal          = new MusteriDal(_context);
            TelefonDal          = new TelefonDal(_context);
            AdresDal            = new AdresDal(_context);
            AdisyonDal          = new AdisyonDal(_context);
            EkMalzemeHareketDal = new EkMalzemeHareketDal(_context);
            GarsonDal           = new GarsonDal(_context);
            MasaDal             = new MasaDal(_context);
            UrunHareketDal      = new UrunHareketDal(_context);
            OdemeTuruDal        = new OdemeTuruDal(_context);
            OdemeHareketDal     = new OdemeHareketDal(_context);
            UrunNotDal          = new UrunNotDal(_context);
        }
 public RestaurantUnitOfWork(RestaurantContext context)
 {
     _context     = context;
     UrunDal      = new UrunDal(_context);
     TanimDal     = new TanimDal(_context);
     PorsiyonDal  = new PorsiyonDal(_context);
     EkMalzemeDal = new EkMalzemeDal(_context);
 }