Adding WithIds to IExpressionFactory

--HG--
branch : 1.x
This commit is contained in:
Sebastien Ros
2011-11-03 19:16:29 -07:00
parent cad9138ac4
commit d3064355f6
2 changed files with 7 additions and 0 deletions

View File

@@ -293,6 +293,12 @@ namespace Orchard.ContentManagement {
return this; return this;
} }
public IExpressionFactory WithIds(ICollection<int> ids) {
Criteria = _query.BindItemCriteria();
Criterion = Restrictions.InG("Id", ids);
return this;
}
public void Eq(string propertyName, object value) { public void Eq(string propertyName, object value) {
Criterion = Restrictions.Eq(propertyName, value); Criterion = Restrictions.Eq(propertyName, value);
} }

View File

@@ -7,6 +7,7 @@ namespace Orchard.ContentManagement {
IExpressionFactory WithRecord(string recordName); IExpressionFactory WithRecord(string recordName);
IExpressionFactory WithVersionRecord(string recordName); IExpressionFactory WithVersionRecord(string recordName);
IExpressionFactory WithRelationship(string propertyName); IExpressionFactory WithRelationship(string propertyName);
IExpressionFactory WithIds(ICollection<int> ids);
void Eq(string propertyName, object value); void Eq(string propertyName, object value);
void Like(string propertyName, object value); void Like(string propertyName, object value);