c# - Razor uses old name of custom class in model after refactoring -


i have multiple projects in website, ones implied here are:

  • common : contains class renamed using refactoring (say renamed oldname newname)
  • viewmodels : contains viewmodel named mymodel had property of type oldname it's type newname
  • website : asp.net mvc4 website razor, try display textbox @html.editorfor(model => model.town)

when have done refactoring, eveything right, type in model changed , went public oldname town { get; set; } public newname town { get; set; }

but when run application , tries execute razor template in @html.editorfor(model => model.town) implemented keeps throwing exception saying there no type 'oldname' in model...

i tried deleting temporary asp.net files, deleting bin/debug folder, changing razor template involved, rebuilding solution, stoping server , trying again, nothing worked, still got same error.

didn't find on google too... (but perhaps didn't type right keywords).

does have idea how solve problem?

thanks in advance help

you're going have change both model type in editortemplate newname , actual filename of editortemplate newname.cshtml.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -