private void ExecuteScalar(QueryTemplateOption option) { using (IDbConnection db = Connection) { var sql = QueryFactory.Build(option, TableMap); db.ExecuteScalarAsync(sql); } }
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(); } }