Esempio n. 1
0
        /// <inheritdoc />
        public ICompiledQuery <TArgs, TMapped> Compile(ILogger logger = null)
        {
            var timer  = new Timer(true);
            var result = QueryMapper.Compile <TArgs, TResult, TMapped>(Query.SqlSyntax, Query, Mapper, RequiresPropertyUnwrap, logger: logger);

            if (logger.CanLogInfo(LogMessages.CompiledQuery))
            {
                logger.LogInfo($"Query compiled in {timer.SplitString()}", LogMessages.CompiledQuery);
            }

            return(result);
        }
Esempio n. 2
0
 /// <inheritdoc />
 public ICompiledQuery <TArgs, TMapped> Compile(ILogger logger = null)
 {
     return(Mapper.Compile(logger));
 }