Skip to content

Instantly share code, notes, and snippets.

@aramkoukia
Created August 5, 2017 22:17
Show Gist options
  • Select an option

  • Save aramkoukia/94278abdfb08280dfbde0dd110b39ba5 to your computer and use it in GitHub Desktop.

Select an option

Save aramkoukia/94278abdfb08280dfbde0dd110b39ba5 to your computer and use it in GitHub Desktop.
public class EFCore2VsDapper
{
EFRepository _EFRepo;
DapperRepository _DapperRepo;
public EFCore2VsDapper()
{
_EFRepo = new EFRepository();
_DapperRepo = new DapperRepository();
}
[Benchmark]
public List<Product> GetProductsWithEntityFramework() => _EFRepo.GetAllProductsByCategory(10);
[Benchmark]
public List<Product> GetProductsWithDapper() => _DapperRepo.GetAllProductsByCategory(10);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment