public bool SubmitConsoleCommand(SubmitCodeModel submitCodeModel) { User currentUser = helper.GetCurrentUser(HttpContext.Current.Session["UserId"]); if (currentUser == null) return false; currentUser.consoleCommand += submitCodeModel.Code.Replace("%2B", "+") + "\n"; return true; }
public bool Submit(SubmitCodeModel submitCodeModel) { User currentUser = helper.GetCurrentUser(HttpContext.Current.Session["UserId"]); if (currentUser == null) return false; currentUser.Code = submitCodeModel.Code.Replace("%2B", "+"); context.SaveChanges(); return true; }