While mapping class i am getting error \'T\' must be a non-abstract type with a public parameterless constructor in order to use it as parameter \'T\' in the generic type or
The problem is that you're trying to use the T from SqlReaderBase as the type argument for MapperBase - but you don't have any constraints on that T.
Try changing your SqlReaderBase declaration to this:
public abstract class SqlReaderBase : ConnectionProvider
where T : new()
Here's a shorter example which demonstrates the same issue:
class Foo
{
Bar bar;
}
class Bar where T : new()
{
}
The fix is to change Foo's declaration to:
class Foo where T : new()
Then the compiler will know that the T from Foo is a valid type argument for Bar.