Beispiel #1
0
        public ActionResult Delete(Guid id)
        {
            var result = _bo.Delete(id);

            if (result.Success)
            {
                return(Ok());
            }
            return(InternalServerError());
        }
Beispiel #2
0
        public ActionResult Delete(Guid id)
        {
            var result = _bo.Delete(id);

            if (result.Success)
            {
                return(Ok());
            }
            return(StatusCode((int)HttpStatusCode.InternalServerError));
        }
Beispiel #3
0
        public void TestDeleteCategorys()
        {
            ContextSeeder.Seed();
            var bo         = new CategoryBusinessObject();
            var resList    = bo.List();
            var resDelete  = bo.Delete(resList.Result.First().Id);
            var resNotList = bo.List().Result.Where(x => !x.IsDeleted).ToList();

            Assert.IsTrue(resDelete.Success && resNotList.Count == 0);
        }