public Repository(UowContext context) { _context = context; _entity = _context.Set <T>(); // desabilita globalmente mecanismo de rastreamento do entity framework que trava (tracking) recurso enquanto está em uso // _context.ChangeTracker.QueryTrackingBehavior = QueryTrackingBehavior.NoTracking; }
public void RemoveUoWConnection(UowContext uowContext) { try { bool isRemoved = _dbConnections.TryRemove(uowContext.contextId, out IDbConnection connection); if (isRemoved) { connection.Close(); } } catch (Exception ex) { throw ex; // _logger.Error("Error in removing DB connection from ConnectionFactory", ex); } }
public EFAccountRepository(UowContext context) : base(context) { }
public IDbConnection GetUoWConnection(UowContext uowContext) { return(_dbConnections.GetOrAdd(uowContext.contextId, (key) => CreateConnection())); }
public Uow(UowContext context) { _context = context; AccountDal = new EFAccountRepository(_context); }
public ProdutoRepository(UowContext context) : base(context) { }
public EFGenericRepository(UowContext context) { _context = context; }
public UnitOfWork(UowContext context) { _context = context; }
public CategoriaProdutoRepository(UowContext context) : base(context) { }