mirror of
https://github.com/BarkProductions/barkman.git
synced 2026-06-13 06:11:55 +00:00
stuff
This commit is contained in:
@@ -4,7 +4,7 @@ using Microsoft.OpenApi.Models;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.Services.AddDbContext<InventoryContext>();
|
||||
builder.Services.AddDbContext<BarkContext>();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen(c =>
|
||||
{
|
||||
@@ -24,11 +24,11 @@ if (app.Environment.IsDevelopment())
|
||||
|
||||
app.MapGet("/", () => "Hello World!");
|
||||
|
||||
app.MapGet("/inventory", async (InventoryContext dbContext) =>
|
||||
{
|
||||
var inventoryItems = await dbContext.Set<InventoryContext>().ToListAsync();
|
||||
return Results.Ok(inventoryItems);
|
||||
});
|
||||
// app.MapGet("/inventory", async (InventoryItems dbContext) =>
|
||||
// {
|
||||
// var inventoryItems = await dbContext.Set<InventoryItems>().ToListAsync();
|
||||
// return Results.Ok(inventoryItems);
|
||||
// });
|
||||
|
||||
//app.MapGet("/inventory/{id}", (int id) => InventoryDb.GetInventory(id));
|
||||
//app.MapPut("/inventory", (InventoryItem item) => InventoryDb.UpdateItem(item));
|
||||
|
||||
Reference in New Issue
Block a user