I have this simple class inside my ASP.NET MVC 3 application:
namespace My.Project.Controllers
{
public ActionResult Settings()
{
var m = GetUserData(userID);
...
}
private UserModel GetUserData(string id)
{
if (string.IsNullOrEmpty(id))
{
return null;
}
...
}
}
Now, I have created a separate area inside the application to house an API. How do I call methods in the first namespace?
namespace My.Project.Areas.api.Controllers
{
public ActionResult Settings()
{
//How to call "GetUserData" from here?
}
}