C# Generic Repository for use with Entity Framework, RavenDB and more with built-in caching options.
C# Other
Clone or download
Permalink
Failed to load latest commit information.
.nuget Make nunit tests run. Jul 26, 2017
SharpRepository.AzureBlobRepository Other better nuget descriptions Nov 3, 2017
SharpRepository.AzureDocumentDb Nuget packages better descriptions Nov 3, 2017
SharpRepository.AzureTableRepository Other better nuget descriptions Nov 3, 2017
SharpRepository.Benchmarks.Configuration Benchmark can run .NET Core 2.0 Feb 1, 2018
SharpRepository.CacheRepository Handle long keys #186 Jan 31, 2018
SharpRepository.Caching.AppFabric Target 4.5.1, not 4.6 Nov 3, 2017
SharpRepository.Caching.Memcached Target 4.5.1, not 4.6 Nov 3, 2017
SharpRepository.Caching.Redis New release of Redis Caching package Jun 13, 2018
SharpRepository.Caching.WindowsAzure Target 4.5.1, not 4.6 Nov 3, 2017
SharpRepository.CouchDbRepository Handle long keys #186 Jan 31, 2018
SharpRepository.Db4oRepository Handle long keys #186 Jan 31, 2018
SharpRepository.EfCoreRepository Released stable releases Feb 1, 2018
SharpRepository.EfRepository Released stable releases Feb 1, 2018
SharpRepository.InMemoryRepository Released stable releases Feb 1, 2018
SharpRepository.Ioc.Autofac Stable versions IoC Mar 28, 2018
SharpRepository.Ioc.Microsoft.DependencyInjection Released stable releases Feb 1, 2018
SharpRepository.Ioc.Mvc Released stable releases Feb 1, 2018
SharpRepository.Ioc.Ninject Nuget packages better descriptions Nov 3, 2017
SharpRepository.Ioc.SimpleInjector Nuget packages better descriptions Nov 3, 2017
SharpRepository.Ioc.StructureMap Released stable releases Feb 1, 2018
SharpRepository.Ioc.Unity Stable versions IoC Mar 28, 2018
SharpRepository.Ioc.Windsor Windsor covers all factory types Nov 9, 2017
SharpRepository.Logging Nuget packages better descriptions Nov 3, 2017
SharpRepository.MongoDbRepository MongoDbRepostitory can pass FetchStrategy to AsQueryable Jun 4, 2018
SharpRepository.RavenDbRepository Released stable releases Feb 1, 2018
SharpRepository.Repository SharpRepository 2.0.4.2 stable released May 28, 2018
SharpRepository.Samples.CoreMvc Project working with both efcore and mongodb Mar 10, 2018
SharpRepository.Samples.MVC5 Updated StructureMap as Transient by default and lifecycle is paramet… Nov 9, 2017
SharpRepository.Samples Runnable tests in windows, updated test messages May 23, 2018
SharpRepository.Tests.Integration MongoDbRepostitory can pass FetchStrategy to AsQueryable Jun 4, 2018
SharpRepository.Tests Default configurations on packages Nov 2, 2017
SharpRepository.XmlRepository Handle long keys #186 Jan 31, 2018
.gitattributes gitattributes for consistant line endings Feb 24, 2013
.gitignore Runnable tests in windows, updated test messages May 23, 2018
CommonAssembly.cs Update assembly info Mar 13, 2013
NunitTests.nunit - Json configuration files red by configurator Oct 19, 2017
README.md Runnable tests in windows, updated test messages May 23, 2018
SharpRepository.sln New autofac and unity packages Mar 22, 2018
SharpRepository.sln.DotSettings Nuget package updates mainly for IOC stuff Mar 13, 2013
license.txt Update assembly info Mar 13, 2013

README.md

sharp repository logo

What is SharpRepository?

SharpRepository is a generic repository written in C# which includes support for various relational, document and object databases including Entity Framework, RavenDB, MongoDb and Db4o. SharpRepository includes Xml and InMemory repository implementations as well. SharpRepository offers built-in caching options for AppFabric, Memcached and standard System.Runtime.Caching. SharpRepository also supports Specifications, FetchStrategies, Batches and Traits.

How do I get started?

Check out the getting started guide. When you're done there, review the SharpRepository.Samples, SharpRepository.Samples.MvcCore, SharpRepository.Samples.MVC5, SharpRepository.Tests.Integration and SharpRepository.Tests project for additional sample usage and implementation details.

Compatibility Issues

  • All packages support .NET Framework 4.6 and .NET Standard 2.0. A good part of them supports .NET Standard 1.3
  • CouchDB Repository is not compatible with CouchDB 2.0.0 (removed temporary views support)

Running tests

Integration tests uses all implementations. In order to avoid failing tests and long timeouts you have to install:

  • CouchDB 1.x (not 2.x)
  • SQL Server Compact
  • MongoDB

We notice timeouts and long test discovery in VS2017 and timeouts in "dotnet test". The best way is use nunit3 console you can get console here https://github.com/nunit/nunit-console/releases and add installation folder in your path After that from your project folder you can run all tests with:

nunit3-console.exe ".\SharpRepository.Samples\bin\Debug\net461\SharpRepository.Samples.dll" ".\SharpRepository.Tests\bin\Debug\net461\SharpRepository.Tests.dll" ".\SharpRepository.Tests.Integration\bin\Debug\net461\SharpRepository.Tests.Integration.dll"

Have Questions?