Example #1
0
 private void ExecuteScalar(QueryTemplateOption option)
 {
     using (IDbConnection db = Connection)
     {
         var sql = QueryFactory.Build(option, TableMap);
         db.ExecuteScalarAsync(sql);
     }
 }
Example #2
0
        public string Build(QueryTemplateOption option, ITableMap table)
        {
            IQueryTemplate template = _container.Resolve <IQueryTemplate>(option.ToString());

            if (template != null)
            {
                return(template.Build(table));
            }
            else
            {
                throw new NotImplementedException();
            }
        }