开发者

Why Controller doesn't recognize a public method which (yet) appears in the intellisense?

开发者 https://www.devze.com 2023-01-01 07:01 出处:网络
I\'m using an helper class that I called CreateEditOrganizationService where I put all the he开发者_JS百科lper methods. In my controller, I\'ve createService as object of that class. So far, I\'ve got

I'm using an helper class that I called CreateEditOrganizationService where I put all the he开发者_JS百科lper methods. In my controller, I've createService as object of that class. So far, I've got 5 methods. Now, I've just defined a 6th method called Set_TypeOrganization.

I'm getting the Set_TypeOrganization in the intellisense, but after I've chose it, I get the following error: CreateEditOrganizationService does not contain a definition for Set_TypeOrganization are you missing a directive or a reference?

public List<TypeOrganization> Set_TypeOrganization(string choice)
{
  //Definition goes here...
}

and in my Controller

CreateEditOrganizationService createService = new CreateEditOrganizationService();
  //...
ViewData["TypeOrganizations"] = createService.Set_TypeOrganization(choice);

Unfortunately, VS shows me the error? Yet, the method appear in the intellisense when I type a dot after the createService object.

Thannks for helping


Recompile your solution, and those glitches will go away as the compiler will consolidate the knowledge about your code.

0

精彩评论

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

关注公众号