Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Circuit
- ------------------
- Id Name Path
- Tag
- -----------
- Id Name Circuit_Id
- foreach (var tag in allPDUTags)
- {
- var removedUnderScoreLast = tag.Path.Remove(tag.Path.LastIndexOf('_'));
- var removedUnderScoreLastButOne = removedUnderScoreLast.Remove(removedUnderScoreLast.LastIndexOf('_'));
- var circuitId = _context.Circuits.Where(c => c.Name == removedUnderScoreLastButOne).FirstOrDefault().Id;
- tag.Circuit_Id = circuitId;
- _counter++;
- if ((_counter%1000)==0)
- {
- Console.WriteLine($"Updated {_counter} of {totalsTags} Tags");
- }
- }
Add Comment
Please, Sign In to add comment