如何将方法的返回类型更改为 JSON

时间:2021-02-02 06:42:35

标签: json methods output refactoring jsonresult

我在我的 dot net core web 应用程序中使用了一个组件。组件的输入参数为JSON。所以我应该改变我的原始方法,以最小的更改将其输出发送为 JSON。有人可以帮我吗?

public IActionResult OnGetEdit(long ceremonyId)
{

    ceremonyGuest = _ceremonyGuestApplication.GetDetail(ceremonyId);
    ViewData["guests"] = ceremonyGuest.AllGuests;

    return Partial("./Edit", ceremonyGuest);
}

0 个答案:

没有答案
相关问题