diff --git a/barkmanAPI/inventoryModel.cs b/barkmanAPI/barkDbModel.cs similarity index 85% rename from barkmanAPI/inventoryModel.cs rename to barkmanAPI/barkDbModel.cs index dfa722e..7d12683 100644 --- a/barkmanAPI/inventoryModel.cs +++ b/barkmanAPI/barkDbModel.cs @@ -2,20 +2,13 @@ using Microsoft.EntityFrameworkCore; using System; using System.Collections.Generic; -public class InventoryContext : DbContext +public class BarkContext : DbContext { - public int Id {get; set;} - public string Name { get; set; } - public string Brand { get; set; } - public string? SerialNumber { get; set; } - public string? Status { get; set; } - public float? RentalPrice { get; set; } - public float? ReplacementCost { get; set; } - public string? Notes { get; set; } + public DbSet Inventory { get; set; } public string DbPath { get; } - public InventoryContext() + public BarkContext() { var folder = Environment.SpecialFolder.LocalApplicationData; var path = Environment.GetFolderPath(folder); @@ -26,5 +19,17 @@ public class InventoryContext : DbContext // special "local" folder for your platform. protected override void OnConfiguring(DbContextOptionsBuilder options) => options.UseSqlite($"Data Source={DbPath}"); - -} \ No newline at end of file +} + +public class InventoryItems +{ + public int Id {get; set;} + public string Name { get; set; } + public string Brand { get; set; } + public string? SerialNumber { get; set; } + public string? Status { get; set; } + public float? RentalPrice { get; set; } + public float? ReplacementCost { get; set; } + public string? Notes { get; set; } +} +