Using interface driven approach or static helper methods
<p>I am using Dapper ORM in the application. I have created an interface with Dapper methods, to have a quick glance for anyone which functions of Dapper is being used in this application  and can easily be replaced by other ORM by implementing it.</p>

<pre><code>public interface IDapperRepository
{            
    IEnumerable&lt;T&gt; GetAll&lt;T&gt;(string query, object cmdParams = null, CommandType cmdType = CommandType.Text) where T : class;
    T GetById&lt;T&gt;(string query, object cmdParams = null, CommandType cmdType = CommandType.Text) where T : class;
}   


class DapperRepository : IDapperRepository
{   
    public IEnumerable&lt;T&gt; GetAll&lt;T&gt;(string query, object cmdParams = null, CommandType cmdType = CommandType.Text) where T : class
    {
        //implementation
    }

    public T GetById&lt;T&gt;(string query, object cmdParams = null, CommandType cmdType = CommandType.Text) where T : class
    {
        //implementation
    }
}
</code></pre>

<p>From DAL Layer:</p>

<pre><code>public class UserRep : IUserRep
{
    private readonly IDapperRepository _iDapperRepository;
    public UserRep()
    {
         _iDapperRepository = new DapperRepository();
    }

    public IEnumerable&lt;UserBO&gt; GetAll()
    {
          return _iDapperRepository.GetAll&lt;UserBO&gt;("select * from users");
    }
    //Other methods
}
</code></pre>

<p>In the users list page, _iUserRep.GetAll() gets called from controller.</p>

<p>From above code, by calling _iUserRep.GetAll() or any other method in the repository classes, DapperRepository class gets instantiated. My question is since I have only utility methods in the DapperRepository class, is it good idea to remove the IDapperRepository and modify DapperRepository as "static" with "static" methods, so that I can call the methods without instantiating it. I would like to know whether there would be any performance gain by doing so.</p>

<p>Also, any inputs to improve this design is appreciated.</p>
