public IActionResult Redirect(Redirect redirect)
 {
     redirect.CreateDate = DateTime.UtcNow;
     if (string.IsNullOrWhiteSpace(redirect.EndPoint))
     {
         return(new StatusCodeResult(StatusCodes.Status400BadRequest));
     }
     if (string.IsNullOrWhiteSpace(redirect.EntryPoint))
     {
         redirect.CreateEntryPoint();
     }
     else if (_context.Redirects.Any(y => String.Equals(y.EntryPoint, redirect.EntryPoint, StringComparison.CurrentCultureIgnoreCase)))
     {
         return(new StatusCodeResult(StatusCodes.Status400BadRequest));
     }
     _context.Redirects.Add(redirect);
     _context.SaveChangesAsync();
     return(Json(redirect));
 }