Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am trying to build this online food ordering app. while testing a HttpPost method in a controller using Postman, I am expecting a bool

image text in transcribedimage text in transcribed

I am trying to build this online food ordering app. while testing a HttpPost method in a controller using Postman, I am expecting a bool value of true, but keep getting the message that corresponds to it being false. this is my WebService Model. this is my DAL model using System; using System. Collections.Generic; \#nullable disable namespace OnlineFoodorderDALCrossPlatform. Models \{ public partial class Item \{ public Item() \{ Orders = new HashSet (); 3 public string ItemId { get; set; } public string ItemName { get; set; } public int CategoryId { get; set; } public decimal Price { get; set ;} public virtual Category Category { get; set; } public virtual ICollection Orders { get; iset;} \} 3 this is the corresponding method from my repository. And this is my method from my controller class. When I test in postman I should be getting back "Successful add of new Item" but keep getting "Failed to add new Item". I have tried a lot of different things with no luck. Any help would be great! this is what I am posting on postman by the way {"Price":19.99}"CategoryId":1,"ItemId":"abc123","ItemName":"MyItem

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

What laws were probably being violated?

Answered: 1 week ago

Question

3. Existing organizations and programs constrain behavior.

Answered: 1 week ago