public override async Task <IPagedResults <Metric> > ToList() { var builder = new MetricQueryBuilder(this); var populateSql = builder.BuildSqlPopulate(); var countSql = builder.BuildSqlCount(); var title = Params.Title.Value ?? string.Empty; var url = Params.Url.Value ?? string.Empty; var ipV4Address = Params.IpV4Address.Value ?? string.Empty; var ipV6Address = Params.IpV6Address.Value ?? string.Empty; var userAgent = Params.UserAgent.Value ?? string.Empty; return(await _store.SelectAsync(new IDbDataParameter[] { new DbParam("PageIndex", DbType.Int32, PageIndex), new DbParam("PageSize", DbType.Int32, PageSize), new DbParam("SqlPopulate", DbType.String, populateSql), new DbParam("SqlCount", DbType.String, countSql), new DbParam("Title", DbType.String, title), new DbParam("Url", DbType.String, url), new DbParam("IpV4Address", DbType.String, ipV4Address), new DbParam("IpV6Address", DbType.String, ipV6Address), new DbParam("UserAgent", DbType.String, userAgent), })); }
public static void Example() { var builder = new MetricQueryBuilder(); var metricQuery = builder.WithCampaignId(10).WithCatalogId(20).Create(); }