public static TEntity Find <TEntity, TOptions>( this ICrudService <TEntity, TOptions> service, TEntity entity, object context = null) where TEntity : IEntity where TOptions : ICrudServiceOptions => service.Find(service.CreateEqualityComparerExpression(entity), context == null ? DefaultCrudServiceOptions.Default <TOptions>() : DefaultCrudServiceOptions.FromContext <TOptions>(context));
public static IEnumerable <TEntity> FindAll <TEntity, TOptions>( this ICrudService <TEntity, TOptions> service, IEnumerable <TEntity> entities, object context = null) where TEntity : IEntity where TOptions : ICrudServiceOptions => service.FindAll(service.CreateEqualityComparerExpression(entities), context == null ? DefaultCrudServiceOptions.Default <TOptions>() : DefaultCrudServiceOptions.FromContext <TOptions>(context));
public static Task <TSelect> FindAsync <TEntity, TOptions, TSelect>( this ICrudService <TEntity, TOptions> service, TEntity entity, Expression <Func <TEntity, TSelect> > select, object context = null) where TEntity : IEntity where TOptions : ICrudServiceOptions => Task.Run(() => service.Find(service.CreateEqualityComparerExpression(entity), select, context == null ? DefaultCrudServiceOptions.Default <TOptions>() : DefaultCrudServiceOptions.FromContext <TOptions>(context)));