private static DataPoint CreateFromFilter(IQueryFilter filter, Database database = null) { Database db = database ?? Db.For <DataPoint>(); var dao = new DataPoint(); filter.Parameters.Each(p => { dao.Property(p.ColumnName, p.Value); }); dao.Save(db); return(dao); }