Ejemplo n.º 1
0
        public async Task <IActionResult> Create(Comanda comanda)
        {
            comanda.Data   = DateTime.Now.ToString();
            comanda.Status = "Aberta";
            await _comandaService.InsertAsync(comanda);

            return(RedirectToAction(nameof(Index)));
        }
Ejemplo n.º 2
0
 public ActionResult <Comanda> Post(Comanda Comanda)
 {
     _ComandaService.InsertAsync(Comanda);
     return(CreatedAtAction(nameof(Get), new { id = Comanda.Id }, Comanda));
 }