Closed frankcollins3 closed 1 year ago
here's the PokemonController and a minimum-viable attempt at linking to the API in postman
[7:15am]
// tried to not clip the person's name into the screenshot by this person's person statement.. I'm not trying to create just a pure REST API. This is a simple razor app so then I would not AddControllersWithViews();
[7:32am]
found this ASP app that has the migrations within the folders and imports the data in Program.cs which mine doesn't: [7:36pm]
creating a namespace for: Data/ApplicationDbContext I think this error indicates a naming conflict between the namespace endpoint and the type in the public class [8:16am]
mapping the endpoints was what was missing and chatGPT never thought to mention it (which is ok): saw this code and explanation on stack overflow with mentions distincting: 1: entity framework backend only // I used code that corresponded to backend EF only. 2: entity framework, Razor Pages/Full-stack ASP only app [6:28am]
attempting to do: connect to the API.
we atleast know the connection string is correct because _EMFMigrationsHistory is added as a table into postgres.
error: 404 not found
proposed approach: 0: if (!app.Environment.IsDevelopment()) { app.UseExceptionHandler("/Error"); 👎 app.UseMigrationsPipeline(); // WebApplication' does not contain a definition for 'UseMigrationsPipeline // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. app.UseHsts(); }
possible improvements: