public void RemoveObject(int id)
        {
            // arrange

            // act
            var removed = _appService.Remove(id);

            // assert
            Assert.IsTrue(removed);
            Assert.IsNull(_appService.GetById(id));
        }
Exemplo n.º 2
0
        // GET: Expenses/Details/5
        public IActionResult Details(long?id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var expense = _service.GetById(id.Value);

            if (expense == null)
            {
                return(NotFound());
            }

            return(View(expense));
        }
        public JsonResult GetbyID(Guid id)
        {
            var expenseFound = _expenseApp.GetById(id).To <ExpenseViewModel>();

            return(Json(expenseFound, JsonRequestBehavior.AllowGet));
        }