Last post Apr 25, 2019 12:22 AM by andrewcw
Apr 24, 2019 04:50 PM|andrewcw|LINK
The controller I have ( asp.net core 2.2 ) has this:
/// <param name="updatedTOCEntry"></param>
/// <param name="useTestTable"></param>
public async Task<string> UpdateTocEntryAsync([FromBody] TocDataItem updatedTOCEntry,[FromRoute] bool useTestTable)
string status = string.Empty; //break point here
From Swagger I can enter the Json Content for TOCDataItem and select the useTestTable variable .... but as soon as I push execute from Swagger - nothing fires and no error occurs. Any Idea what is wrong ? I have tried [FromQuery] for the
useTestTable same problem. Creating 2 [FromBody] causes MVC error.
Apr 25, 2019 12:18 AM|andrewcw|LINK
Reply to self here - I fired up another Rest service to duplicate piece by piece the parameters and signature - and it works...
public async Task<string> UpdateTocEntryAsync([FromBody] Models.ItemDown updatedTOCEntry, [FromRoute] bool useTestTable)
string retVal = updatedTOCEntry.Name;
Console.Write("Did we get here?");
therefore the problem must be somewhere else in my code... still looking
Apr 25, 2019 12:22 AM|andrewcw|LINK
Yikes - Turned Laptop off ( reboot ) restart VIsual Studio and all works as expected ! Arf..