Generally while creating entity for our documentDB collection/document, we used to add the JsonProperty() attribute to each & every field.
Now to create a similar DomainModel or ViewModel we used to copy this entity class & deleting all the lines with JsonProperty()
If our class contains more properties it looks very tedious task. What if we've something with which we can mark all the line having "JsonProperty" attribute then delete all those marked lines.
In Visual studio we don't have such extension, but we can achieve this using notepad++ editor.
here are the steps to remove all the lines contains specific word (e.g.: JsonProperty)
This way all the line containing your specific work (e.g. JsonProperty) will get highlighted.
Now. Go to "Search" => "Bookmark" => "Remove Bookmarked Lines"
and we're done :)
Here are the above mentioned step-by-step process with screen shots
Now to create a similar DomainModel or ViewModel we used to copy this entity class & deleting all the lines with JsonProperty()
If our class contains more properties it looks very tedious task. What if we've something with which we can mark all the line having "JsonProperty" attribute then delete all those marked lines.
In Visual studio we don't have such extension, but we can achieve this using notepad++ editor.
here are the steps to remove all the lines contains specific word (e.g.: JsonProperty)
- Copy your code to nodepad++
- Ctrl + F & go to Mark tab
- Enter your text here "JsonProperty"
- Tick "Bookmark All" check-box and click on "Mark All"
This way all the line containing your specific work (e.g. JsonProperty) will get highlighted.
Now. Go to "Search" => "Bookmark" => "Remove Bookmarked Lines"
and we're done :)
Here are the above mentioned step-by-step process with screen shots
- Copy your code to nodepad++
- Ctrl + F & go to Mark tab
- Enter your text here "JsonProperty"
- Tick "Bookmark All" check-box and click on "Mark All"
verify your book-marked lines
- Go to "Search" => "Bookmark" => "Remove Bookmarked Lines"
- And all the lines containing specific words deleted
Comments
Post a Comment