Esempio n. 1
0
        public async Task <IActionResult> Post([FromBody] Models.Order entry)
        {
            var aggregate = entry.ToAggregate();

            return(Ok(await aggregate.Create()));
        }
Esempio n. 2
0
 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());
 }