private CommandTemplate GetCommandTemplate(string tableName, SimpleExpression criteria) { var tableCommandCache = _commandCaches.GetOrAdd(tableName, _ => new ConcurrentDictionary<string, CommandTemplate>()); var hash = new ExpressionHasher().Format(criteria); return tableCommandCache.GetOrAdd(hash, _ => new FindHelper(_adapter.GetSchema()) .GetFindByCommand(_adapter.GetSchema().BuildObjectName(tableName), criteria) .GetCommandTemplate(_adapter.GetSchema().FindTable(_adapter.GetSchema().BuildObjectName(tableName)))); }
private CommandTemplate GetCommandTemplate(string tableName, SimpleExpression criteria) { var tableCommandCache = _commandCaches.GetOrAdd(tableName, _ => new ConcurrentDictionary <string, CommandTemplate>()); var hash = new ExpressionHasher().Format(criteria); return(tableCommandCache.GetOrAdd(hash, _ => new FindHelper(_adapter.GetSchema()) .GetFindByCommand(ObjectName.Parse(tableName), criteria) .GetCommandTemplate(_adapter.GetSchema().FindTable(ObjectName.Parse(tableName))))); }