开发者

Is rename refactoring working for somebody in strongly typed razor views?

开发者 https://www.devze.com 2023-02-27 11:22 出处:网络
I have a model that looks like this: public class P开发者_JS百科erson { public string PostalCode {get;set;}

I have a model that looks like this:

public class P开发者_JS百科erson
{
     public string PostalCode {get;set;}
}

Then I have a razor view

@model MvcApp1.Person

Your location is: @Model.PostalCode

When I am using Visual Studio's 2010 rename refactoring (Ctrl+R,R) the property gets renamed on the model class, but stays the same in the view.

My understanding is that since the view is strongly typed, renaming should have also happened in the view.

What am I doing wrong?


VS's refactoring engine doesn't support Razor.

0

精彩评论

暂无评论...
验证码 换一张
取 消