Skip to content

Commit

Permalink
Relax type constraints on value passed to WhereLess* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
aa-dit-yuh authored Feb 6, 2024
1 parent 83ffd14 commit 45a6565
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions MscrmTools.Shared/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3271,7 +3271,7 @@ public Query<T> WhereLastYear<U>(string tableAlias, Expression<Func<U, object>>
/// <param name="column">Logical name of the column</param>
/// <param name="value">The value</param>
/// <returns>The <see cref="Query{T}"/></returns>
public Query<T> WhereLessEqual(Expression<Func<T, object>> column, int value)
public Query<T> WhereLessEqual(Expression<Func<T, object>> column, object value)
{
QueryExpression.Criteria.AddCondition(AnonymousTypeHelper.GetAttributeName(column), ConditionOperator.LessEqual, value);

Expand All @@ -3283,7 +3283,7 @@ public Query<T> WhereLessEqual(Expression<Func<T, object>> column, int value)
/// <param name="column">Logical name of the column</param>
/// <param name="value">The value</param>
/// <returns>The <see cref="Query{T}"/></returns>
public Query<T> WhereLessEqual<U>(string tableAlias, Expression<Func<U, object>> column, int value) where U : Entity
public Query<T> WhereLessEqual<U>(string tableAlias, Expression<Func<U, object>> column, object value) where U : Entity
{
QueryExpression.Criteria.AddCondition(tableAlias, AnonymousTypeHelper.GetAttributeName(column), ConditionOperator.LessEqual, value);

Expand All @@ -3294,7 +3294,7 @@ public Query<T> WhereLessEqual<U>(string tableAlias, Expression<Func<U, object>>
/// <param name="column">Logical name of the column</param>
/// <param name="value">The value</param>
/// <returns>The <see cref="Query{T}"/></returns>
public Query<T> WhereLessThan(Expression<Func<T, object>> column, int value)
public Query<T> WhereLessThan(Expression<Func<T, object>> column, object value)
{
QueryExpression.Criteria.AddCondition(AnonymousTypeHelper.GetAttributeName(column), ConditionOperator.LessThan, value);

Expand All @@ -3306,7 +3306,7 @@ public Query<T> WhereLessThan(Expression<Func<T, object>> column, int value)
/// <param name="column">Logical name of the column</param>
/// <param name="value">The value</param>
/// <returns>The <see cref="Query{T}"/></returns>
public Query<T> WhereLessThan<U>(string tableAlias, Expression<Func<U, object>> column, int value) where U : Entity
public Query<T> WhereLessThan<U>(string tableAlias, Expression<Func<U, object>> column, object value) where U : Entity
{
QueryExpression.Criteria.AddCondition(tableAlias, AnonymousTypeHelper.GetAttributeName(column), ConditionOperator.LessThan, value);

Expand Down Expand Up @@ -4590,4 +4590,4 @@ public T GetById(Guid id, IOrganizationService service, bool isActivityEntity =

#endregion Service calls
}
}
}

0 comments on commit 45a6565

Please sign in to comment.