예제 #1
0
        public void RemoverTest()
        {
            medicamentoService.Remover(2);
            Assert.AreEqual(2, medicamentoService.ObterTodos().Count());
            var medicamento = medicamentoService.Obter(2);

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