I have an interface
public interface IIdentity<T>
{
T GetUser();
}
I have a base class that implements the Interface as an abstract method
public abstract class BaseUser<T> : IIdentity<T>
{
public string UserId { get; set; }
public string AuthType { get; set; }
public List<Claim> Claims { get; set; }
public abstract T GetUser();
}
In the class that inherits the base class
public class JwtUser : BaseUser
{
public string Sub { get; set; }
}
I get an error using the generic type BaseUser requires 1 argument, what do i do here, basically I'd like my user to inherit shared properties from the base class which it does (i think) and to implement the generic method from the base class as I'm going to have different types of users (JWT/Windows etc) I need to abstract away the getUsers method, hope that makes sense ?