Esempio n. 1
0
 private void detach_UserTopicScores(UserTopicScore entity)
 {
     this.SendPropertyChanging();
     entity.User = null;
 }
Esempio n. 2
0
 private void attach_UserTopicScores(UserTopicScore entity)
 {
     this.SendPropertyChanging();
     entity.Topic = this;
 }
Esempio n. 3
0
 partial void DeleteUserTopicScore(UserTopicScore instance);
Esempio n. 4
0
 partial void UpdateUserTopicScore(UserTopicScore instance);
Esempio n. 5
0
 partial void InsertUserTopicScore(UserTopicScore instance);
Esempio n. 6
0
        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();
        }