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