My Controller method is called successfully and the view model loads data, but throws an error upon returning.
public AccountManagerViewModel Get(string id)
{
AccountManagerViewModel account = new AccountManagerViewModel(Guid.Parse(id));
return account;
}
I tried adding the [Serializable] attribute to the class with no luck.
Does what I'm doing make sense? We're hoping to reuse as much code from our MVC app in the new Web API app so we really don't want to have to create new classes that we have to manually populate from our ViewModels and return from the Web API controller methods.