예제 #1
0
        public async Task <List <Departamento> > GetDepartamentoByEmpresa(int clienteId)
        {
            var result = await _contexto.Departamento.Where(d => d.CliId == clienteId).ToListAsync();

            if (result == null)
            {
                throw new ArgumentException("Código cliente informado não cadastrado " + clienteId.ToString());
            }

            return(await _departamentoRepositorio.GetDepartamentoByEmpresa(clienteId));
        }