Ejemplo n.º 1
0
 public async Task NovoAtendenteAsync(Atendente atendente)
 {
     try
     {
         _atendenteContext.Add(atendente);
         await _atendenteContext.SaveChangesAsync();
     }
     catch (Exception e)
     {
         throw new Exception($"Erro ao adiconar novo atendente. Detalhes: {e.Message}");
     }
 }
Ejemplo n.º 2
0
 public async Task NovoClienteAsync(Cliente c)
 {
     try
     {
         _clienteContext.Clientes.Add(c);
         await _clienteContext.SaveChangesAsync();
     }
     catch (Exception e)
     {
         throw new Exception($"Erro ao salvar cliente. {e.Message}");
     }
 }