public ActionResult Add(AddEditMaterialViewModel vModel) { ApplicationUser authedUser = UserManager.FindById(User.Identity.GetUserId()); IMaterial newObj = vModel.DataObject; string message; if (newObj.Create(authedUser.GameAccount, authedUser.GetStaffRank(User)) == null) { message = "Error; Creation failed."; } else { LoggingUtility.LogAdminCommandUsage("*WEB* - AddMaterialData[" + newObj.Id.ToString() + "]", authedUser.GameAccount.GlobalIdentityHandle); message = "Creation Successful."; } return(RedirectToAction("Index", new { Message = message })); }