public async Task <IActionResult> Post([FromBody] Models.Order entry) { var aggregate = entry.ToAggregate(); return(Ok(await aggregate.Create())); }
public async Task <IActionResult> Put(Guid id, [FromBody] Models.Order entry) { throw new NotImplementedException(); }
public static Aggregates.Order ToAggregate(this Models.Order order) { return(new Aggregates.Order.With(order.CustomerName, order.Size) .Toppings(order.Toppings.Select(x => x.ToValueObject()).ToList()) .Build()); }