예제 #1
0
        public void SendSuggestion(string suggestion, string emailAddress)
        {
            var costumeSuggestion = new CostumeSuggestion
            {
                EmailAddress = emailAddress,
                Suggestion   = suggestion
            };

            _context.CostumeSuggestions.Add(costumeSuggestion);
            Save();
        }
예제 #2
0
        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();
        }