예제 #1
0
 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}'" }));
     }
 }
예제 #2
0
        public void Delete(int id)
        {
            string ip = HttpContext.Connection.RemoteIpAddress.MapToIPv4().ToString();

            wordsManipulationService.RemoveWord(id, ip);
        }