Ejemplo n.º 1
0
        public void RemoverTest()
        {
            medicamentoService.Remover(2);
            Assert.AreEqual(2, medicamentoService.ObterTodos().Count());
            var medicamento = medicamentoService.Obter(2);

            Assert.AreEqual(null, medicamento);
        }
Ejemplo n.º 2
0
 public ActionResult Delete(int id, MedicamentoModel medicamentoModel)
 {
     _medicamentoService.Remover(id);
     return(RedirectToAction(nameof(Index)));
 }
Ejemplo n.º 3
0
 public async Task <CustomResponse <Medicamento> > Delete(string MedicamentoId)
 {
     return(await _service.Remover(Guid.Parse(MedicamentoId), Guid.Parse(HttpContext.User.Identity.Name)));
 }