Exemple #1
0
 private void detach_UserTopicScores(UserTopicScore entity)
 {
     this.SendPropertyChanging();
     entity.User = null;
 }
Exemple #2
0
 private void attach_UserTopicScores(UserTopicScore entity)
 {
     this.SendPropertyChanging();
     entity.Topic = this;
 }
Exemple #3
0
 partial void DeleteUserTopicScore(UserTopicScore instance);
Exemple #4
0
 partial void UpdateUserTopicScore(UserTopicScore instance);
Exemple #5
0
 partial void InsertUserTopicScore(UserTopicScore instance);
        public void RateTopic(int topicId, int score)
        {
            var db = GetDbContext();

            var rating = new UserTopicScore {Score = score, TopicId = topicId, UserId = GetCurrentUser().Id};
            db.UserTopicScores.InsertOnSubmit(rating);

            db.SubmitChanges();
        }