private void detach_UserTopicScores(UserTopicScore entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_UserTopicScores(UserTopicScore entity) { this.SendPropertyChanging(); entity.Topic = this; }
partial void DeleteUserTopicScore(UserTopicScore instance);
partial void UpdateUserTopicScore(UserTopicScore instance);
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(); }