title: ASP.NET Core 2.0 service life time
body: <p>I have api application ,service &amp; repository class library application . Service part i write business logic and repository only communicate for database. My question which type of dependency is best for repository and service .</p>
  
  <pre><code>services.AddScoped&lt;ITicketRepository, TicketRepository&gt;();
  services.AddTransient&lt;ITicketRepository, TicketRepository&gt;();
  services.AddSingleton&lt;ITicketRepository, TicketRepository&gt;();
  </code></pre>