how to add success key in web api json array C# web api 2

45 Views Asked by At

[Route("api/GetMenuBykidnew")] [HttpGet] public IHttpActionResult GetMenuBykidnew(int kid, string Username) {

        ApiBusiness ApiBus = new ApiBusiness();

        var result = ApiBus.GetKitchenMenubyKitchennew(kid, Username);
        return result;

    }

[ { "CartId": 1016, "OrderId": 124, "Username": "7887878787", "KitchenId": null, "CartAddedDate": "2020-01-21T00:00:00", "MenuId": 2055, "MenuName": "Veg Fried Rice", "MenuVariantId": 2055, "Rate": 91, "Quantity": 4, "ListPrice": 91, "ListGST": 4.55, "ListPacking": 5, "TotalPrice": 100.55, "MenuStatus": 0 } ]

Expected result

success:[ { "CartId": 1016, "OrderId": 124, "Username": "8892696780", "KitchenId": null, "CartAddedDate": "2020-01-21T00:00:00", "MenuId": 2055, "MenuName": "Veg Fried Rice", "MenuVariantId": 2055, "Rate": 91, "Quantity": 4, "ListPrice": 91, "ListGST": 4.55, "ListPacking": 5, "TotalPrice": 100.55, "MenuStatus": 0 } ]

0

There are 0 best solutions below