Renaming a property in the dbml file

Hi

Is there anyway to safely rename a property from a dbml file (the designer)?

At the moment I go into the dbml designer and rename the property from there - but it doesn't always pick up the strings used for the Mapping.ColumnAttributes etc

Thanks
Jeremy

4 comments
Comment actions Permalink

Hello Jeremy,

Do you use ReSharper's rename refactoring to rename the property? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi

Is there anyway to safely rename a property from a dbml file (the
designer)?

At the moment I go into the dbml designer and rename the property from
there - but it doesn't always pick up the strings used for the
Mapping.ColumnAttributes etc

Thanks
Jeremy
---
Original message URL:
http://devnet.jetbrains.net/message/5290429#5290429



0
Comment actions Permalink

Resharper's rename refactoring does not work in the dbml designer.

I use the rename refactoring from the dbml.designer.cs - but as previously said it doesn't pick up a lot of the string references.

Thanks
Jeremy

0
Comment actions Permalink

Hello Jeremy,

Do I understand correctly that ReSharper doesn't pick up some of the string
references even if you have 'Search in comments and string literals' option
turned on during rename refactoring? Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Resharper's rename refactoring does not work in the dbml designer.

I use the rename refactoring from the dbml.designer.cs - but as
previously said it doesn't pick up a lot of the string references.

Thanks
Jeremy
---
Original message URL:
http://devnet.jetbrains.net/message/5291082#5291082



0
Comment actions Permalink

Andrey

Yes.

I had a field called DetailsID in the database.

This field is used extensively throughout the project

I renamed it from the dbml.designer.cs to ID. It didn't pick up that the source field should have remained as "_DetailsID" and changed it to "_ID". I should probably have spotted this, but it threw up so many "false positives" from the "Search in comments" that I must have missed this.

The issue is not the renaming as such, but that Resharper should? know about dbml files.

Similarly, a rename of a property even with Search in Comments does not pick up properties in XAML. What I do at the moment is do a Search with all options on, which finds everything in the XAML, rename the property and then go to the XAML to manually rename the DataBindings.

Regards
Jeremy

0

Please sign in to leave a comment.