I have an Abstract class that is implemented like this:
public abstract class BaseImplementation<T, U> : IHistory<T>
where T : class, IEntity, new()
where U : DbContext, new()
I understand that the generic argument <U>
is an EF DbContext
.
I understand that the generic argument <T>
must be a class that implements the IEntity
Interface.
What is the "new()"?
Must be a new instance of a given class? What is the purpose of that?
Note that is declared in both <T>
and <U>
Thank you.