DbExpressions.DbExpressionFactory.AddYears C# (CSharp) Method

AddYears() public method

Creates a DbDateTimeFunctionExpression that represents adding the specified number of years to the target date time.
public AddYears ( DbExpression target, DbExpression numberExpression ) : DbDateTimeFunctionExpression
target DbExpression A that represents the target date time.
numberExpression DbExpression A that represents the number of years to add.
return DbDateTimeFunctionExpression
        public DbDateTimeFunctionExpression AddYears(DbExpression target, DbExpression numberExpression)
        {
            return MakeDateTimeFunction(DbDateTimeFunctionExpressionType.AddYears, new[] { target, numberExpression });
        }