0

SELECT SUM(Quantity) as Quantity FROM tblcart where Username =@Username and MenuId= @MenuId and KitchenId= @KitchenId and MenuStatus=0

end

public IEnumerable<MenuModel> GetKitchenMenuOnCartAdd(int? kid, string Username, int? menuid)
{
    var GetMenu = db.tblMenus.Where(a => a.KitchenId == kid && a.MenuId == menuid).Select(a => new MenuModel
    {
        MenuId = a.MenuId,
        Name = a.Name,
        Description = a.Description,
        Discount = a.Discount,
         //not getting the return value in button status
          -----> 
       ButtonStatus = db.spSumCart(Username, menuid, kid).FirstOrDefault(),
    }
    ).ToList();
    return`GetMenu;
}



CDJB
  • 14,043
  • 5
  • 29
  • 55
  • 1
    check the answers here : https://stackoverflow.com/questions/14735477/get-return-value-from-stored-procedure – Mohammed Sajid Feb 10 '20 at 17:28
  • 1
    Does this answer your question? [Get return value from stored procedure](https://stackoverflow.com/questions/14735477/get-return-value-from-stored-procedure) – Nguyễn Văn Phong Feb 11 '20 at 01:26

0 Answers0