public Emprestimo EfetuarEmprestimo(Livro livro, Pessoa cliente, Pessoa atendente, DateTime?dataEmprestimo = null) { var estoque = _estoqueRepository.GetByFilter(est => est.Livro.Id == livro.Id).FirstOrDefault(); estoque.RemoverDoEstoque(1); var emprestimo = new Emprestimo(livro, cliente, atendente, dataEmprestimo); return(emprestimo); }