I am trying to use a pagemodel class in a client side Blazor in a way so i dont have to retype all the "base" properties
I was thinking of creating class
public partial class SomePage : BasePage
{ }
Error CS0263 Partial declarations of 'Somepage' must not specify different base classes
My base classe looks like this
public class BasePage : ComponentBase
{
[Inject]
protected NavigationManager NavigationManager { get; set; }
[Inject]
protected HttpClient Http { get; set; }
}
I also tried changing adding IComponent, IHandleEvent, IHandleAfterRender so it looks like this
public class BasePage : ComponentBase, IComponent, IHandleEvent, IHandleAfterRender
but that did not help.
Any ideas how to inherit from a base class in PageModel partial declaration?