public override Entity Get(long id, Type entityType) { foreach (var es in eStates) { if (es.Entity.ID == id) { return(es.Entity); } } OracleConnection connection = GetConnection(); try { connection.Open(); IEntityBroker broker = GetBroker(entityType); Entity entity = broker.Get(id, connection); eStates.Add(new EntityState(entity, State.UNCHANGED)); return(entity); } finally { connection?.Close(); } }