public class SomeRepository<TContext> : IDisposable
where TContext : DbContext, new()
{
protected TContext context;
protected SomeRepository()
{ }
public virtual void Create<T>(T item) where T : class, new()
{
...
}
}
internal class SomeCrud : SomeRepository<SomeContext>
{
public override void Create(Product item)
{
....
}
}
}
我在 public override void Create(Product item) not suitable method found to override 时遇到错误。请有人看到错误吗?如果我这样写:
public override void Create<Product>(Product item)
{
....
}
我看不到产品类型 谢谢