|
using Application.Core.Specification.Implementation;
using System;
using System.Linq.Expressions;
namespace Application.Core.Specification
{
/// <summary>
/// True specification
/// </summary>
/// <typeparam name="TEntity">Type of entity in this specification</typeparam>
public sealed class TrueSpecification<T> : Specification<T> where T : class
{
#region Specification overrides
/// <summary>
///
/// </summary>
/// <returns></returns>
public override System.Linq.Expressions.Expression<Func<T, bool>> SatisfiedBy()
{
//Create "result variable" transform adhoc execution plan in prepared plan
//for more info: http://geeks.ms/blogs/unai/2010/07/91/ef-4-0-performance-tips-1.aspx
bool result = true;
Expression<Func<T, bool>> trueExpression = t => result;
return trueExpression;
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.