1

When I create new mvc4 project "Internet application" the AccountController has a reference to mvc4.Models. When I create "basic application" and copy above controller to it I can't resolve said namespace. What did I misunderstand ? Thanks.

4

1 回答 1

1

There is no such thing as a basic application. Do you mean an empty application?

An empty application does not create any Model classes. The /Model folder is empty, so the classes the Account Controller is referencing (LoginModel, RegisterModel, etc) do not exist. You need to copy them over as well. (Although if you're just going to copy all of the files, just use an Internet Application project instead of an empty one...)

于 2012-07-16T15:20:56.500 回答