public ActionResult ChangeStatus(int id) { var account = _customerAccountService.GetCustomer(id); _logger.InfoFormat("Change status [{0}] of a user with id [{1}]", id, account.IsActive); if (ModelState.IsValid) { if (account != null) { _customerAccountService.ChangeStatus(account); _logger.InfoFormat("Changed status of a user with id [{0}] to [{1}] ", id, account.IsActive); } } _logger.InfoFormat("Status change for user with id [{0}] failed.", id); return(RedirectToAction("Users", "Admin")); }