This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Configuration; | |
| using System.Linq; | |
| using Autofac; | |
| using MySample.Data; | |
| using MySample.Data.SampleData; | |
| using MySample.Entities; | |
| using SSW.DataOnion.Core; | |
| using SSW.DataOnion.Core.Initializers; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using Microsoft.EntityFrameworkCore; | |
| using System.Threading; | |
| using System.Threading.Tasks; | |
| using MySample.Entities; | |
| using SSW.DataOnion.Interfaces; | |
| namespace MySample.Data.SampleData | |
| { | |
| public class SampleDataSeeder : IDataSeeder | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <connectionStrings> | |
| <clear /> | |
| <add name="MySampleDbConnection" connectionString="Server=(localdb)\mssqllocaldb;Database=MySample;Trusted_Connection=True;MultipleActiveResultSets=true" providerName="System.Data.SqlClient"/> | |
| </connectionStrings> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Data.Entity; | |
| using MySample.Entities; | |
| namespace MySample.Data | |
| { | |
| public class MySampleDbContext : DbContext | |
| { | |
| public IDbSet<Product> Products { get; set; } | |
| public IDbSet<ProductCategory> ProductCategories { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| namespace MySample.Entities | |
| { | |
| public class Order | |
| { | |
| public int Id { get; set; } | |
| public string CustomerName { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MySample.Entities | |
| { | |
| public class OrderLineItem | |
| { | |
| public int Id { get; set; } | |
| public decimal Price { get; set; } | |
| public int Quantity { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MySample.Entities | |
| { | |
| public class Product | |
| { | |
| public int Id { get; set; } | |
| public string Name { get; set; } | |
| public string Sku { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace MySample.Entities | |
| { | |
| public class ProductCategory | |
| { | |
| public int Id { get; set; } | |
| public string Name { get; set; } | |
| } | |
| } |