Hey there, getting a missing method exception when trying to create a new page using FreshMVVM.
System.MissingMethodException: Default constructor not found for type InContext.Kemosabe.UI.ViewModels.ProjectSelectionPageModel
This is the PageModel:
public class ProjectSelectionPageModel : FreshBasePageModel
{
private readonly IProjectService _projectService;
public ProjectSelectionPageModel(IProjectService projectService)
{
_projectService = projectService;
}
}
The IProjectService is registered on App start and the code works if I add this constructor to ProjectSelectionPageModel:
public ProjectSelectionPageModel() : this(FreshIOC.Container.Resolve<IProjectService>()) { }
So that is does the resolution in the construction. However, I want to do constructor injection and FreshMVVM claims to handle this.
As a note, the page is being created by this call: FreshPageModelResolver.ResolvePageModel<ProjectSelectionPageModel>(clientId);
Though the same issue is seen with the PushPageModel call.`
What am I missing?