-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInitialData.cs
53 lines (47 loc) · 2.63 KB
/
InitialData.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
namespace Ordering.Infrastructure.Data.Extensions;
internal class InitialData
{
public static IEnumerable<Customer> Customers =>
new List<Customer>
{
Customer.Create(CustomerId.Of(new Guid("58c49479-ec65-4de2-86e7-033c546291aa")), "mehmet", "mehmet@gmail.com"),
Customer.Create(CustomerId.Of(new Guid("189dc8dc-990f-48e0-a37b-e6f2b60b9d7d")), "john", "john@gmail.com")
};
public static IEnumerable<Product> Products =>
new List<Product>
{
Product.Create(ProductId.Of(new Guid("5334c996-8457-4cf0-815c-ed2b77c4ff61")), "IPhone X", 500),
Product.Create(ProductId.Of(new Guid("c67d6323-e8b1-4bdf-9a75-b0d0d2e7e914")), "Samsung 10", 400),
Product.Create(ProductId.Of(new Guid("4f136e9f-ff8c-4c1f-9a33-d12f689bdab8")), "Huawei Plus", 650),
Product.Create(ProductId.Of(new Guid("6ec1297b-ec0a-4aa1-be25-6726e3b51a27")), "Xiaomi Mi", 450)
};
public static IEnumerable<Order> OrdersWithItems
{
get
{
var address1 = Address.Of("mehmet", "ozkaya", "mehmet@gmail.com", "Bahcelievler No:4", "Turkey", "Istanbul", "38050");
var address2 = Address.Of("john", "doe", "john@gmail.com", "Broadway No:1", "England", "Nottingham", "08050");
var payment1 = Payment.Of("mehmet", "5555555555554444", "12/28", "355", 1);
var payment2 = Payment.Of("john", "8885555555554444", "06/30", "222", 2);
var order1 = Order.Create(
OrderId.Of(Guid.NewGuid()),
CustomerId.Of(new Guid("58c49479-ec65-4de2-86e7-033c546291aa")),
OrderName.Of("ORD_1"),
shippingAddress: address1,
billingAddress: address1,
payment1);
order1.Add(ProductId.Of(new Guid("5334c996-8457-4cf0-815c-ed2b77c4ff61")), 2, 500);
order1.Add(ProductId.Of(new Guid("c67d6323-e8b1-4bdf-9a75-b0d0d2e7e914")), 1, 400);
var order2 = Order.Create(
OrderId.Of(Guid.NewGuid()),
CustomerId.Of(new Guid("189dc8dc-990f-48e0-a37b-e6f2b60b9d7d")),
OrderName.Of("ORD_2"),
shippingAddress: address2,
billingAddress: address2,
payment2);
order2.Add(ProductId.Of(new Guid("4f136e9f-ff8c-4c1f-9a33-d12f689bdab8")), 1, 650);
order2.Add(ProductId.Of(new Guid("6ec1297b-ec0a-4aa1-be25-6726e3b51a27")), 2, 450);
return new List<Order> { order1, order2 };
}
}
}