title: How to create abstract layers between various ORMs (entity framework and Dapper)?
body: <p>I want to create abstract layer between entity framework and Dapper.In runtime i can choose either entity framework or Dapper or i will both of them also. I know that i can use interface</p>
  
  <pre><code>public IORM{
      Save();
      Delete();
      //other ORM functions
  }
  
  public EntityFramework : IORM{
      public Save(){
      SaveChanges();
      }
      public Delete(){
      Remove();
      }
  }
  
  
  public Dapper: IORM{
      public Save(){
      //save code goes here
      }
      public Delete(){
      //delete code goes here
      }
  </code></pre>
  
  <p>But this is basic operations and not sure how to configure in .net core 2.0 <code>CofigureServices()</code> Method. </p>
  
  <blockquote>
    <p>Is abstractions between different ORMs advisable? If yes how to
    implement abstract layer between Entity framework and Dapper in .net
    core 2.0?</p>
  </blockquote>