private static Function CreateCollectionServiceOperation(string name, DataType type)
 {
     return(new Function(name)
     {
         ReturnType = DataTypes.CollectionType.WithElementDataType(type),
         Parameters =
         {
             new FunctionParameter("arg1", type),
             new FunctionParameter("arg2", type),
             new FunctionParameter("arg3", type),
         },
         Annotations =
         {
             new LegacyServiceOperationAnnotation()
             {
                 Method = HttpVerb.Get,
                 ReturnTypeQualifier = ServiceOperationReturnTypeQualifier.IEnumerable,
             },
             new FunctionBodyAnnotation()
             {
                 FunctionBody = LinqBuilder.AnonymousArray(
                     CommonQueryBuilder.FunctionParameterReference("arg1"),
                     CommonQueryBuilder.FunctionParameterReference("arg2"),
                     CommonQueryBuilder.FunctionParameterReference("arg3")),
             },
         }
     });
 }