public ActionResult Delete(Guid id)
        {
            var result = _bo.Delete(id);

            if (result.Success)
            {
                return(Ok());
            }
            return(StatusCode((int)HttpStatusCode.InternalServerError));
        }
Exemplo n.º 2
0
        public void TestDeleteStaffRecord()
        {
            RestaurantSeeder.Seed();
            var bo        = new StaffRecordBusinessObject();
            var resList   = bo.List();
            var resDelete = bo.Delete(resList.Result.First().Id);

            resList = bo.ListNonDeleted();
            Assert.IsTrue(resDelete.Success && resList.Success && resList.Result.Count == 0);
        }
Exemplo n.º 3
0
        public ActionResult Delete(Guid id)
        {
            var result = _bo.Delete(id);

            if (result.Success)
            {
                return(Ok());
            }
            return(InternalServerError());
        }
        public void TestDeleteClientRecord()
        {
            RestaurantSeeder.SeedCountries();
            var bo         = new StaffRecordBusinessObject();
            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);
        }
Exemplo n.º 5
0
        public void TestDeleteStaffRecord()
        {
            ContextSeeders.Seed();
            var bo = new StaffRecordBusinessObject();

            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);
        }