Skip to content

Commit ee05f62

Browse files
committed
Renamed local variables to relatedTopics, savedTopics
This naming convention is more descriptive and intuitive than the previous `scope` and `relatedTopics` variable names.
1 parent 1842963 commit ee05f62

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

OnTopic.Data.Sql/SqlTopicRepository.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,15 +656,15 @@ private static void PersistRelations(Topic topic, SqlConnection connection) {
656656
foreach (var key in topic.Relationships.Keys) {
657657

658658
var targetIds = new TopicListDataTable();
659-
var scope = topic.Relationships.GetTopics(key);
659+
var relatedTopics = topic.Relationships.GetTopics(key);
660660
var topicId = topic.Id.ToString(CultureInfo.InvariantCulture);
661-
var relatedTopics = scope.Where(t => t.Id > 0).Select<Topic, int>(m => m.Id);
661+
var savedTopics = relatedTopics.Where(t => t.Id > 0).Select<Topic, int>(m => m.Id);
662662

663663
command = new SqlCommand("UpdateRelationships", connection) {
664664
CommandType = CommandType.StoredProcedure
665665
};
666666

667-
foreach (var targetTopicId in relatedTopics) {
667+
foreach (var targetTopicId in savedTopics) {
668668
targetIds.AddRow(targetTopicId);
669669
}
670670

@@ -678,7 +678,7 @@ private static void PersistRelations(Topic topic, SqlConnection connection) {
678678
targetIds.Dispose();
679679

680680
//Reset isDirty, assuming there aren't any unresolved references
681-
scope.IsDirty = relatedTopics.Count() < scope.Count;
681+
relatedTopics.IsDirty = savedTopics.Count() < relatedTopics.Count;
682682

683683
}
684684

0 commit comments

Comments
 (0)