backed end add

This commit is contained in:
2025-02-03 10:06:11 -06:00
parent 0203e7bd3b
commit faa8f13a42
6 changed files with 147 additions and 3 deletions
+2
View File
@@ -73,6 +73,7 @@ inventoryGroup.MapPut("/{id}", async (int id, InventoryItems updatedItem, BarkCo
}
existingItem.Name = updatedItem.Name;
existingItem.Barcode = updatedItem.Barcode;
existingItem.Brand = updatedItem.Brand;
existingItem.SerialNumber = updatedItem.SerialNumber;
existingItem.Status = updatedItem.Status;
@@ -88,6 +89,7 @@ inventoryGroup.MapPost("", async (InventoryItems newItemInput, BarkContext db) =
{
var newItem = new InventoryItems();
newItem.Name = newItemInput.Name;
newItem.Barcode = newItemInput.Barcode;
newItem.Brand = newItemInput.Brand;
newItem.SerialNumber = newItemInput.SerialNumber;
newItem.RentalPrice = newItemInput.RentalPrice;