Skip to content
This repository has been archived by the owner on May 7, 2020. It is now read-only.

Commit

Permalink
added predicatebuilder to console app to test purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
osoykan committed Feb 5, 2017
1 parent 3300336 commit 6335a35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/Stove.Demo.ConsoleApp/SomeDomainService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

using Autofac.Extras.IocManager;

using LinqKit;

using MassTransit;

using Stove.BackgroundJobs;
Expand Down Expand Up @@ -82,11 +84,19 @@ public void DoSomeStuff()

#region DAPPER

var list = new List<string>
{
"elma", "armut"
};

ExpressionStarter<Animal> predicate = PredicateBuilder.New<Animal>();
predicate.And(x => x.Name == "Kuş");

IEnumerable<Animal> birdsSet = _animalDapperRepository.GetSet(new { Name = "Kuş" }, 0, 10, "Id");

IEnumerable<Person> personFromDapper = _personDapperRepository.GetList(new { Name = "Oğuzhan" });

IEnumerable<Animal> birdsFromExpression = _animalDapperRepository.GetSet(x => x.Name == "Kuş", 0, 10, "Id");
IEnumerable<Animal> birdsFromExpression = _animalDapperRepository.GetSet(predicate, 0, 10, "Id");

IEnumerable<Animal> birdsPagedFromExpression = _animalDapperRepository.GetListPaged(x => x.Name == "Kuş", 0, 10, "Name");

Expand Down
1 change: 1 addition & 0 deletions test/Stove.Demo.ConsoleApp/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"FluentAssemblyScanner": "1.0.5",
"Hangfire.Core": "1.6.8",
"Hangfire.SqlServer": "1.6.8",
"LinqKit": "1.1.8",
"MassTransit": "3.5.5",
"Newtonsoft.Json": "9.0.1",
"Owin": "1.0",
Expand Down

0 comments on commit 6335a35

Please sign in to comment.