diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Sales/ConfigureServices.cs b/Sales/ConfigureServices.cs deleted file mode 100644 index 117aab3..0000000 --- a/Sales/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Sales -{ - public static class ConfigureServices - { - public static void ConfigureSalesServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddSalesControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Sales/ConfigureServices.cs b/Sales/ConfigureServices.cs deleted file mode 100644 index 117aab3..0000000 --- a/Sales/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Sales -{ - public static class ConfigureServices - { - public static void ConfigureSalesServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddSalesControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Sales/Sales.csproj b/Sales/Sales.csproj deleted file mode 100644 index 2c53f40..0000000 --- a/Sales/Sales.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Sales/ConfigureServices.cs b/Sales/ConfigureServices.cs deleted file mode 100644 index 117aab3..0000000 --- a/Sales/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Sales -{ - public static class ConfigureServices - { - public static void ConfigureSalesServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddSalesControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Sales/Sales.csproj b/Sales/Sales.csproj deleted file mode 100644 index 2c53f40..0000000 --- a/Sales/Sales.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - - diff --git a/Sales/SalesDbContext.cs b/Sales/SalesDbContext.cs deleted file mode 100644 index 0a77307..0000000 --- a/Sales/SalesDbContext.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Sales -{ - public class SalesDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=sales.db"); - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - modelBuilder.Entity().HasKey(product => product.Sku); - - modelBuilder.Entity().HasData(new SalesProduct - { - Sku = "abc123", - Price = 85, - ForSale = true, - FreeShipping = false, - QuantityOnHand = 25 - }); - } - } - - public class SalesProduct - { - public string Sku { get; set; } - public decimal Price { get; set; } - public int QuantityOnHand { get; set; } - public bool ForSale { get; set; } - public bool FreeShipping { get; set; } - - - } -} \ No newline at end of file diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Sales/ConfigureServices.cs b/Sales/ConfigureServices.cs deleted file mode 100644 index 117aab3..0000000 --- a/Sales/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Sales -{ - public static class ConfigureServices - { - public static void ConfigureSalesServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddSalesControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Sales/Sales.csproj b/Sales/Sales.csproj deleted file mode 100644 index 2c53f40..0000000 --- a/Sales/Sales.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - - diff --git a/Sales/SalesDbContext.cs b/Sales/SalesDbContext.cs deleted file mode 100644 index 0a77307..0000000 --- a/Sales/SalesDbContext.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Sales -{ - public class SalesDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=sales.db"); - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - modelBuilder.Entity().HasKey(product => product.Sku); - - modelBuilder.Entity().HasData(new SalesProduct - { - Sku = "abc123", - Price = 85, - ForSale = true, - FreeShipping = false, - QuantityOnHand = 25 - }); - } - } - - public class SalesProduct - { - public string Sku { get; set; } - public decimal Price { get; set; } - public int QuantityOnHand { get; set; } - public bool ForSale { get; set; } - public bool FreeShipping { get; set; } - - - } -} \ No newline at end of file diff --git a/Warehouse/ConfigureServices.cs b/Warehouse/ConfigureServices.cs deleted file mode 100644 index 908b632..0000000 --- a/Warehouse/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Warehouse -{ - public static class ConfigureServices - { - public static void ConfigureWarehouseServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddWarehouseControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Sales/ConfigureServices.cs b/Sales/ConfigureServices.cs deleted file mode 100644 index 117aab3..0000000 --- a/Sales/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Sales -{ - public static class ConfigureServices - { - public static void ConfigureSalesServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddSalesControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Sales/Sales.csproj b/Sales/Sales.csproj deleted file mode 100644 index 2c53f40..0000000 --- a/Sales/Sales.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - - diff --git a/Sales/SalesDbContext.cs b/Sales/SalesDbContext.cs deleted file mode 100644 index 0a77307..0000000 --- a/Sales/SalesDbContext.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Sales -{ - public class SalesDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=sales.db"); - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - modelBuilder.Entity().HasKey(product => product.Sku); - - modelBuilder.Entity().HasData(new SalesProduct - { - Sku = "abc123", - Price = 85, - ForSale = true, - FreeShipping = false, - QuantityOnHand = 25 - }); - } - } - - public class SalesProduct - { - public string Sku { get; set; } - public decimal Price { get; set; } - public int QuantityOnHand { get; set; } - public bool ForSale { get; set; } - public bool FreeShipping { get; set; } - - - } -} \ No newline at end of file diff --git a/Warehouse/ConfigureServices.cs b/Warehouse/ConfigureServices.cs deleted file mode 100644 index 908b632..0000000 --- a/Warehouse/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Warehouse -{ - public static class ConfigureServices - { - public static void ConfigureWarehouseServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddWarehouseControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Warehouse/Warehouse.csproj b/Warehouse/Warehouse.csproj deleted file mode 100644 index 12efb50..0000000 --- a/Warehouse/Warehouse.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - diff --git a/Purchasing/ConfigureServices.cs b/Purchasing/ConfigureServices.cs deleted file mode 100644 index 91798c7..0000000 --- a/Purchasing/ConfigureServices.cs +++ /dev/null @@ -1,14 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Purchasing -{ - public static class ConfigureServices - { - public static void ConfigurePurchasingServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Purchasing/Purchasing.csproj b/Purchasing/Purchasing.csproj deleted file mode 100644 index c36d812..0000000 --- a/Purchasing/Purchasing.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - diff --git a/Purchasing/PurchasingDbContext.cs b/Purchasing/PurchasingDbContext.cs deleted file mode 100644 index 8a3e952..0000000 --- a/Purchasing/PurchasingDbContext.cs +++ /dev/null @@ -1,21 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Purchasing -{ - public class PurchasingDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=purchasing.db"); - } - } - - public class PurchasingProduct - { - public string Sku { get; set; } - public string Cost { get; set; } - } -} \ No newline at end of file diff --git a/Sales/ConfigureServices.cs b/Sales/ConfigureServices.cs deleted file mode 100644 index 117aab3..0000000 --- a/Sales/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Sales -{ - public static class ConfigureServices - { - public static void ConfigureSalesServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddSalesControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Sales/Sales.csproj b/Sales/Sales.csproj deleted file mode 100644 index 2c53f40..0000000 --- a/Sales/Sales.csproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - - - - - diff --git a/Sales/SalesDbContext.cs b/Sales/SalesDbContext.cs deleted file mode 100644 index 0a77307..0000000 --- a/Sales/SalesDbContext.cs +++ /dev/null @@ -1,41 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Sales -{ - public class SalesDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=sales.db"); - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - modelBuilder.Entity().HasKey(product => product.Sku); - - modelBuilder.Entity().HasData(new SalesProduct - { - Sku = "abc123", - Price = 85, - ForSale = true, - FreeShipping = false, - QuantityOnHand = 25 - }); - } - } - - public class SalesProduct - { - public string Sku { get; set; } - public decimal Price { get; set; } - public int QuantityOnHand { get; set; } - public bool ForSale { get; set; } - public bool FreeShipping { get; set; } - - - } -} \ No newline at end of file diff --git a/Warehouse/ConfigureServices.cs b/Warehouse/ConfigureServices.cs deleted file mode 100644 index 908b632..0000000 --- a/Warehouse/ConfigureServices.cs +++ /dev/null @@ -1,19 +0,0 @@ -using MediatR; -using Microsoft.Extensions.DependencyInjection; - -namespace Warehouse -{ - public static class ConfigureServices - { - public static void ConfigureWarehouseServices(this IServiceCollection collection) - { - collection.AddDbContext(); - collection.AddMediatR(typeof(ConfigureServices).Assembly); - } - - public static void AddWarehouseControllers(this IMvcBuilder mvcBuilder) - { - mvcBuilder.AddApplicationPart(typeof(ConfigureServices).Assembly); - } - } -} \ No newline at end of file diff --git a/Warehouse/Warehouse.csproj b/Warehouse/Warehouse.csproj deleted file mode 100644 index 12efb50..0000000 --- a/Warehouse/Warehouse.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - net5.0 - - - - - - - - - - - - - - - diff --git a/Warehouse/WarehouseDbContext.cs b/Warehouse/WarehouseDbContext.cs deleted file mode 100644 index f2668ab..0000000 --- a/Warehouse/WarehouseDbContext.cs +++ /dev/null @@ -1,33 +0,0 @@ -using Microsoft.EntityFrameworkCore; - -namespace Warehouse -{ - public class WarehouseDbContext : DbContext - { - public DbSet Products { get; set; } - - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - base.OnConfiguring(optionsBuilder); - optionsBuilder.UseSqlite("Data Source=warehouse.db"); - } - - protected override void OnModelCreating(ModelBuilder modelBuilder) - { - base.OnModelCreating(modelBuilder); - modelBuilder.Entity().HasKey(product => product.Sku); - - modelBuilder.Entity().HasData(new WarehouseProduct - { - Sku = "abc123", - QuantityOnHand = 25 - }); - } - } - - public class WarehouseProduct - { - public string Sku { get; set; } - public int QuantityOnHand { get; set; } - } -} \ No newline at end of file