在ASP.NET Core中应用OData全局的[EnableQuery]属性

时间:2018-03-28 15:41:12

标签: asp.net asp.net-mvc asp.net-core odata

在ASP.NET中,我可以使用以下代码行在全球范围内启用查询支持。

#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

using namespace std;
int dic [96];

int main()
{
    char input [1001];
    int i;
    bool x = false;

    while (gets(input))
    {
        int length = strlen(input);

        for (i = 0; i < length; i++)
        {
            dic[input[i] - 32]++;
        }

        if (x)
            printf("\n");

        x = true;
        int j;

        for (i = 1; i < 1000; i++)
        {
            for (j = 96; j >= 0; j--)
            {
                if (dic[j] == i)
                    printf("%d %d\n", j + 32, dic[j]);
            }
        }
        memset(dic, 0, sizeof(dic));
    }
    return 0;
}

OData最近放弃了他们的beta2版本的AspNetCore.OData。使用它我们可以使用[EnableQuery]在操作级别启用查询支持 我们是否有类似ASP.NET的代码,我可以在ASP.NET核心OData中全局启用

0 个答案:

没有答案