Badges.Areas.Admin.Controllers.BadgeRequestController.Deny C# (CSharp) Method

Deny() public method

public Deny ( System.Guid id, string reason ) : System.Web.Mvc.ActionResult
id System.Guid
reason string
return System.Web.Mvc.ActionResult
        public ActionResult Deny(Guid id, string reason)
        {
            var badge = RepositoryFactory.BadgeRepository.GetNullableById(id);

            if (badge == null)
            {
                return HttpNotFound();
            }

            Message = "The badge has been denied and deleted from the system";

            _notificationService.Notify(badge.Creator, AuthenticatedUser,
                "Your badge design has been rejected",
                "Sorry, your \"" + badge.Name + "\" badge was rejected for the following reason: " + reason,
                null);
            RepositoryFactory.BadgeRepository.Remove(badge);

            return RedirectToAction("Index");
        }