© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
8 replies
IDjinn

✅ Error while injecting generic interface

public class Repository<TId, TEntity> : IRepository<TId, TEntity> where TEntity : class
{
}
public class Repository<TId, TEntity> : IRepository<TId, TEntity> where TEntity : class
{
}


public interface IRepository<TId, TEntity> where TEntity : class
{
    public Task<TEntity?> GetAsync(TId id);
    public void Update(TEntity entity);
    public void Delete(TEntity entity);
}
public interface IRepository<TId, TEntity> where TEntity : class
{
    public Task<TEntity?> GetAsync(TId id);
    public void Update(TEntity entity);
    public void Delete(TEntity entity);
}
image.png
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Interface implementing generic parameters
C#CC# / help
2y ago
help with generic interface
C#CC# / help
2y ago
Generic Interfaces
C#CC# / help
3y ago