public ActionResult DeleteConfirmed(int id) { Platform platform = _platformService.Find(id); _platformService.Delete(platform); return(RedirectToAction("Manage")); }
public async Task <IActionResult> Delete(int id) { var errorResult = _platformService.Delete(id); if (errorResult != ErrorResult.None) { return(new InternalErrorObjectResult(_errorCreator.CreateApplicationError(new[] { $"Could not delete platform with Id:'{id}'", errorResult.Message }.ToList(), Guid.NewGuid().ToString()))); } return(Ok()); }
public IActionResult Delete(PlatformDeleteViewModel viewModel) { Platform platform = platformService.GetByID(viewModel.Platform.ID); if (platform == null) { return(NotFound()); } platformService.Delete(platform.ID); return(RedirectToAction("Index")); }
/// <summary> /// function for deleting data /// </summary> public IActionResult Delete(int id) { _platformService.Delete(id); return(RedirectToAction(nameof(Index))); }
public IActionResult Remove(string platformName) { _platformService.Delete(platformName); return(Ok(platformName)); }