GodelTech.Data is a .NET library designed to facilitate access to data storage using the Unit of Work, Repository, and Entity design patterns. It provides interfaces for implementing these patterns and includes support for Entity Framework Core through the GodelTech.Data.EntityFrameworkCore library.
GodelTech.Data
project has interfaces for Unit of Work and Repository pattern.
Implementation of it for Entity Framework Core can be found in library GodelTech.Data.EntityFrameworkCore
You can find Repository extensions using QueryParameters
and ISpecification
that allows you create requests easier.
QueryParameters.cs
public class QueryParameters<TEntity, TKey>
where TEntity : class, IEntity<TKey>
{
public FilterRule<TEntity, TKey> Filter { get; set; }
public SortRule<TEntity, TKey> Sort { get; set; }
public PageRule Page { get; set; }
}
SpecificationBase.cs
public abstract class SpecificationBase<TEntity, TKey> : CompositeSpecification<TEntity, TKey>
where TEntity : class, IEntity<TKey>
{
public override bool IsSatisfiedBy(TEntity candidate) => AsExpression().Compile().Invoke(candidate);
public abstract Expression<Func<TEntity, bool>> AsExpression();
}
This project is licensed under the MIT License. See the LICENSE file for more details.