public void Create() { if (!_context.Buyers.Any()) { var buyers = new Buyer[] { Buyer.Create(Guid.NewGuid().ToString(), "Alice"), Buyer.Create(Guid.NewGuid().ToString(), "Bob"), }; _context.AddRange(buyers); _context.SaveChanges(); } }
public void Add(OrderingLog orderingLog) { _context.OrderingLogs.Add(orderingLog); _context.SaveChanges(); }