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