Coder Social home page Coder Social logo

arslanaybars / fop Goto Github PK

View Code? Open in Web Editor NEW
106.0 6.0 14.0 216 KB

Filtering, Ordering (Sorting) and Pagination library for .Net Core, ASP.NET Core, C#

License: MIT License

C# 97.97% PowerShell 2.03%
filter order sort page filtering sorting paging netcore asp-net-core

fop's Introduction

Hi there 👋

Information: [email protected] 📫

Microsoft Certification ID: 12537722

Resume: https://stackoverflow.com/cv/arslanaybars

I am Microsoft .NET stack based Developer 🤔 . I enjoy being challenged and working on new projects. I am always trying to learn new skills and development techniques to improve software development life cycle. In particular, I like to experience new cultures and learn new languages as part of my career progression. Following Concepts: RTFM, DRY, GTD, TDD, JFGI 💬

I am not a rock star or ninja, just a person who knows how to work effectively and can be a team-worker. 🚀

fop's People

Contributors

altinburak avatar arslanaybars avatar fpaganetto avatar ith-lmsandoval avatar v1torcorreia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

fop's Issues

Support for .net core 6

Hi,
I have a project which is being ported to .netcore 6 from .netcore3.1.

I saw in documentation that it supports only .netcore3.1.

When can I expect the feature to be included?

Ordering with Multiple Columns

Order the data by more than one column.

PS: It may affect to fop order query language so, will need to add the feature in the new major version.

Case insensitive string comparisons

Hi!

First I'd like to thank you for your work.

Different ORMs and different providers for those ORMs generate different SQL statements for string comparisons. Different DBs treat those statements differently (some are case sensitive, some are not). I propose that there is either a switch or a part of a filter where case sensitivity can be explicitly set to true or false. My idea is that this is then applied as either .ToUpper() or .ToLower() inside StringDataTypeStrategy.cs.
Most providers know how to project .ToLower() or .ToUpper() to a proper SQL statement.

What do you think?

Best regards,
Anže

Should not set initial paging values

Should not pass the initial value for pageNumber and pageSize from the library.

Now we are passing;
pageNumber = 1;
pageSize = 100;

It's as part of application not fop

Icompatible Version

Trying to use this library for my netcore 3.1 project and some dependencies in the library are incompatible with this version of .NET. I will love for this to be resolved as the library is a simple and easy to use.
FOP

case insensitivity & Turkish character filtering problem with mongodb

it is not possible to filter unless you type the exact substring in db.
For example ;
The data in the field is "MAVİ GİYİM A.Ş."

to filter other datas,
it works fine by the time you type "mav"

however, when its "mavi", it does not return any data and forces user to type exactly the as the stored string.

Filtering a nested collection

Fop should allow filtering by nested object fields.

Ex: Student has Department so Fop should support nested filtering
?filter=Student.Department.Name==Software Engineering

Is Enum filtering supported

Hi, I'm currently feeling a bit dumb as I can't get filtering with enums to work.

I'm trying to filter with the ordinal / int value of the enum, however, it fails to map the int to the corresponding enum value:

2023-07-10 08:13:35.3869|ERROR|MYPROJECT.Common.ErrorLogHandler.Helpers.LoggerService|System.InvalidOperationException: The binary operator Equal is not defined for the types 'MYPROJECT.API.DataAccess.DB.Enums.EUserRole' and 'System.Int32'.
   at System.Linq.Expressions.Expression.GetEqualityComparisonOperator(ExpressionType binaryType, String opName, Expression left, Expression right, Boolean liftToNull)
   at System.Linq.Expressions.Expression.Equal(Expression left, Expression right, Boolean liftToNull, MethodInfo method)
   at DynamicExpresso.Parsing.Parser.GenerateEqual(Expression left, Expression right)
   at DynamicExpresso.Parsing.Parser.ParseComparison()
   at DynamicExpresso.Parsing.Parser.ParseLogicalAnd()
   at DynamicExpresso.Parsing.Parser.ParseLogicalXor()
   at DynamicExpresso.Parsing.Parser.ParseLogicalOr()
   at DynamicExpresso.Parsing.Parser.ParseConditionalAnd()
   at DynamicExpresso.Parsing.Parser.ParseConditionalOr()
   at DynamicExpresso.Parsing.Parser.ParseConditional()
   at DynamicExpresso.Parsing.Parser.ParseAssignment()
   at DynamicExpresso.Parsing.Parser.ParseExpressionSegment()
   at DynamicExpresso.Parsing.Parser.ParseParenExpression()
   at DynamicExpresso.Parsing.Parser.ParsePrimaryStart()
   at DynamicExpresso.Parsing.Parser.ParsePrimary()
   at DynamicExpresso.Parsing.Parser.ParseUnary()
   at DynamicExpresso.Parsing.Parser.ParseMultiplicative()
   at DynamicExpresso.Parsing.Parser.ParseAdditive()
   at DynamicExpresso.Parsing.Parser.ParseTypeTesting()
   at DynamicExpresso.Parsing.Parser.ParseComparison()
   at DynamicExpresso.Parsing.Parser.ParseLogicalAnd()
   at DynamicExpresso.Parsing.Parser.ParseLogicalXor()
   at DynamicExpresso.Parsing.Parser.ParseLogicalOr()
   at DynamicExpresso.Parsing.Parser.ParseConditionalAnd()
   at DynamicExpresso.Parsing.Parser.ParseConditionalOr()
   at DynamicExpresso.Parsing.Parser.ParseConditional()
   at DynamicExpresso.Parsing.Parser.ParseAssignment()
   at DynamicExpresso.Parsing.Parser.ParseExpressionSegment()
   at DynamicExpresso.Parsing.Parser.ParseExpressionSegment(Type returnType)
   at DynamicExpresso.Parsing.Parser.Parse()
   at DynamicExpresso.Parsing.Parser.Parse(ParserArguments arguments)
   at DynamicExpresso.Interpreter.ParseAsLambda(String expressionText, Type expressionType, Parameter[] parameters)
   at DynamicExpresso.Interpreter.ParseAs[TDelegate](String expressionText, String[] parametersNames)
   at DynamicExpresso.Interpreter.ParseAsExpression[TDelegate](String expressionText, String[] parametersNames)
   at Fop.Extensions.ApplyFop[T](IQueryable`1 source, IFopRequest request)
   at MYPROJECT.API.BusinessLogic.Services.UserService.PaginateUser(IFopQuery searchQuery, IQueryable`1 query) in C:\Path\To\Project\api\MYPROJECT.API.BusinessLogic\Services\UserService.cs:line 332
   at MYPROJECT.API.BusinessLogic.Services.UserService.GetAllUsersAsync(IFopQuery searchQuery) in C:\Path\To\Project\api\MYPROJECT.API.BusinessLogic\Services\UserService.cs:line 132
   at MYPROJECT.API.Controllers.UserController.GetAllUser(SearchFilterQuery searchQuery) in C:\Path\To\Project\api\MYPROJECT.API\Controllers\UserController.cs:line 43

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.