Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

nuget.org : filterconditional

var fb = new ConditionalFilterGenerator<Your Entity>(Request.RequestUri.ParseQueryString(), new ConditionalFilterBuilder()); COMMENT: first example fb.And<int>((e, i) => e.Id > i, "id") .And<int>((e, i) => e.Id < 4, "Id") .Or<string>((e, s) => e.Name.StartsWith(s), "name"); COMMENT: second example. This example contains in section 'Or' parameter type of boolean. This parameter is talking if name-value 'Id' has been existed early in expression it is will not be used NOTE: If name-value "id" or "name" not exists in the collection QueryString then expression will be skipped and will be used the expression 'Or' fb.And<int, IEnumerable<string>>((e, i, a) => e.Id == i && a.Any(s => e.Name.StartsWith(s)), "id", "name") .Or<int>((e, i) => e.Id == 5, false, "id"); COMMENT:predicate result var result = fb.GetConditional(); //In Controller will need add attribute [ModelBinder(typeof(Your ModelBinder))]Expression<Func<Your Entity, bool>> pr

Registry - JSON
purl: pkg:nuget/filterconditional
Keywords: ASP.MVC, Filter, ASP
License:
Latest release: about 8 years ago
First release: about 8 years ago
Downloads: 1,477 total
Last synced: 24 days ago

    Loading...
    Readme
    Loading...