public abstract class BaseEntity<T>
{
public T? Id { get; set; }
}
public interface IDocumentRepository<TDocument, TId> where TDocument : BaseEntity<TId>
{
Task<TDocument> FindByIdAsync(TId id);
}
Is this code can be implemented without passing TId
in at the IDocumentRepository
interface?
So something like this:
public interface IDocumentRepository<TDocument> where TDocument : BaseEntity<T>
{
Task<TDocument> FindByIdAsync(T id);
}