DbExpressions.SQLiteQueryTranslator.GetAggregateFunctionBody C# (CSharp) Method

GetAggregateFunctionBody() protected method

Gets the textual representation of the aggregateFunctionExpressionType
protected GetAggregateFunctionBody ( DbAggregateFunctionExpressionType aggregateFunctionExpressionType ) : string
aggregateFunctionExpressionType DbAggregateFunctionExpressionType The for which to return the textual representation.
return string
        protected virtual string GetAggregateFunctionBody(DbAggregateFunctionExpressionType aggregateFunctionExpressionType)
        {
            switch (aggregateFunctionExpressionType)
            {
                case DbAggregateFunctionExpressionType.Avg:
                    return "AVG({0})";
                case DbAggregateFunctionExpressionType.Count:
                    return "COUNT({0})";
                case DbAggregateFunctionExpressionType.Max:
                    return "MAX({0})";
                case DbAggregateFunctionExpressionType.Min:
                    return "MIN({0})";
                case DbAggregateFunctionExpressionType.Sum:
                    return "SUM({0})";
                default:
                    throw new ArgumentOutOfRangeException("aggregateFunctionExpressionType", aggregateFunctionExpressionType, " is not supported");
            }
        }