Exemplo n.º 1
0
        public async Task <Comanda> ConfirmarAsync(Guid comandaId)
        {
            Comanda comanda = await ComandaCrud
                              .Include(c => c.Garcom)
                              .Include(c => c.Pedidos)
                              .ThenInclude(c => c.Produto)
                              .Where(c => c.Id == comandaId).FirstOrDefaultAsync();

            comanda.Confirmar();
            DbContext.Entry(comanda)
            .CurrentValues.SetValues(comanda);
            return(comanda);
        }