public void SendSuggestion(string suggestion, string emailAddress) { var costumeSuggestion = new CostumeSuggestion { EmailAddress = emailAddress, Suggestion = suggestion }; _context.CostumeSuggestions.Add(costumeSuggestion); Save(); }
public void HideSuggestion(long suggestionId, string userName) { int userId = _context.Users.Single(e => e.UserName == userName).UserId; var suggestion = new CostumeSuggestion { CostumeSuggestionId = suggestionId }; _context.CostumeSuggestions.Attach(suggestion); suggestion.HiddenByUserId = userId; Save(); }