mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Addind extension methods to provide IsLike shortcuts, and fixing regressions.
--HG-- branch : NH3
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
c47525e90819321d37962a11313006a4ccfc8362 src/Orchard.Web/Modules/Orchard.AntiSpam
|
c47525e90819321d37962a11313006a4ccfc8362 src/Orchard.Web/Modules/Orchard.AntiSpam
|
||||||
86eb54fecd30f01ee9157d77def9e1a1aef2d6c3 src/Orchard.Web/Modules/Orchard.Autoroute
|
f41ead8138ef8eaec32e2c2826100ca175c15730 src/Orchard.Web/Modules/Orchard.Autoroute
|
||||||
a8cd78f4730747bf592935aaa605874938a9c89f src/Orchard.Web/Modules/Orchard.ContentPermissions
|
a8cd78f4730747bf592935aaa605874938a9c89f src/Orchard.Web/Modules/Orchard.ContentPermissions
|
||||||
d466369118538a8ca77754d047ee841d016ea9c2 src/Orchard.Web/Modules/Orchard.ContentPicker
|
d466369118538a8ca77754d047ee841d016ea9c2 src/Orchard.Web/Modules/Orchard.ContentPicker
|
||||||
3ad1bdc80b8374433d98469e8740bc48ef114be2 src/Orchard.Web/Modules/Orchard.CustomForms
|
3ad1bdc80b8374433d98469e8740bc48ef114be2 src/Orchard.Web/Modules/Orchard.CustomForms
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using NHibernate.Criterion;
|
||||||
using Orchard.ContentManagement.Records;
|
using Orchard.ContentManagement.Records;
|
||||||
|
|
||||||
namespace Orchard.ContentManagement {
|
namespace Orchard.ContentManagement {
|
||||||
@@ -137,6 +138,18 @@ namespace Orchard.ContentManagement {
|
|||||||
return query.Slice(0, count);
|
return query.Slice(0, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static bool IsStartingWith(this string property, string value) {
|
||||||
|
return property.IsLike(value + "*");
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsEndingWith(this string property, string value) {
|
||||||
|
return property.IsLike("*" + value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static bool IsContaining(this string property, string value) {
|
||||||
|
return property.IsLike("*" + value + "*");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ContentGetExtensions {
|
public static class ContentGetExtensions {
|
||||||
|
Reference in New Issue
Block a user