public IActionResult DeleteWord(WordManipulationViewModel input) { if (wordManipulator.RemoveWord(input.Word, HttpContext.Connection.LocalIpAddress.MapToIPv4().ToString())) { return(RedirectToAction("ManipulateWordResult", new { message = $"Word '{input.Word}' deleted succesfully" })); } else { return(RedirectToAction("ManipulateWordResult", new { message = $"Could not delete word '{input.Word}'" })); } }
public void Delete(int id) { string ip = HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString(); wordsManipulationService.RemoveWord(id, ip); }