frankcollins3 / ASPokedex

Pokedex with ASP backend / razor pages, and VanillaJS front end
1 stars 0 forks source link

/api/pokemon/1 (not found) [10:48pm] #12

Open frankcollins3 opened 1 year ago

frankcollins3 commented 1 year ago

attempting to do: do a simple api test and return the only data in psql data tables. Screen Shot 2023-09-19 at 10 49 00 PM

error: Screen Shot 2023-09-19 at 10 46 43 PM

proposed approach: this is the reducing method that becomes the return data for the route. possibly make this simpler, instead of checking for ID just return anything in there which would only be 'bulbasaur' Screen Shot 2023-09-19 at 10 49 15 PM // in saying so.. just wondering if this is a typing between int and string.

possible improvements:

frankcollins3 commented 1 year ago

possible casing error. why use p.Id instead of p.id: FirstOrDefault(p => p.Id == id) [10:53pm]

wrong it's going by the namespace class not the psql shell table: Screen Shot 2023-09-19 at 10 53 45 PM [10:54pm]

frankcollins3 commented 1 year ago

approach is minimum viability: 👎 var pokemon = _db.Context.FirstOrDefault()

now trying this: return Ok("hey how are you guys");

[10:58pm]