Ejemplo n.º 1
0
 public async Task <IActionResult> Delete(Guid id, bool rollback = false)
 {
     try
     {
         return(Ok(await ServiceTypeManager.Delete(id, rollback)));
     }
     catch (Exception ex)
     {
         return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
     }
 }
Ejemplo n.º 2
0
        public void DeleteTest()
        {
            var         task        = ServiceTypeManager.Load();
            ServiceType serviceType = task.Result.FirstOrDefault();

            task.Wait();

            var task2  = ServiceTypeManager.Delete(serviceType.Id, true);
            int result = task2.Result;

            task2.Wait();

            Assert.IsTrue(result > 0);
        }