Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void UpdateTextAnswerText(questions question, int textAnswerId, string newText)
- {
- List<text_answers> textAnswers = GetTextAnswers(question);
- using (surveyDBcontext = new surveysdbEntities1())
- {
- text_answers textAnswer = textAnswers.Where(x => x.Id == textAnswerId).FirstOrDefault();
- textAnswer.Answer = newText;
- surveyDBcontext.SaveChanges();
- }
- }
- public void UpdateUserPassword(string userName, string newPassword)
- {
- users user = GetUserByName(userName);
- using (surveyDBcontext = new surveysdbEntities1())
- {
- user.User_password = newPassword;
- surveyDBcontext.SaveChanges();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement