public ActionResult Delete(Guid id) { var result = _bo.Delete(id); if (result.Success) { return(Ok()); } return(new ObjectResult(HttpStatusCode.InternalServerError)); }
public ActionResult Delete(Guid id) { var result = _bo.Delete(id); if (result.Success) { return(Ok()); } return(InternalServerError()); }
public void TestDeleteMenu() { RestaurantSeeder.Seed(); var bo = new MenuBusinessObject(); var resList = bo.List(); var total = resList.Result.Count; var resDelete = bo.Delete(resList.Result.First().Id); resList = bo.ListNonDeleted(); Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.Count == total - 1); }
public void TestDeleteMenu() { ContextSeeders.Seed(); var bo = new MenuBusinessObject(); var resList = bo.List(); var resDelete = bo.Delete(resList.Result.First().Id); resList = bo.List(); Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.First().IsDeleted); }
public ActionResult Delete(Guid id) { var res = _bo.Delete(id); if (res.Success) { return(Ok()); } else { return(StatusCode((int)HttpStatusCode.InternalServerError)); } }