casbin / Casbin.NET

An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
https://casbin.org
Apache License 2.0
1.13k stars 110 forks source link

How to return a custom type instead of using IQueryable type in IPolicyFilter #344

Closed Muzi999 closed 4 months ago

Muzi999 commented 4 months ago

I am currently writing a custom adapter to support SqlSugar. This interface requires passing an ISugarQueryable type instead of an IQueryable type. How can this change be made?

image

casbin-bot commented 4 months ago

@sagilio @sociometry @AsakusaRinne

hsluoyz commented 4 months ago

@Muzi999 why close?

huazhikui commented 4 months ago

Hey there! Essentially, we're trying to keep things more generic in our code, which means not tying ourselves too closely to any specific types from SqlSugar, like with the IPolicyFilter. It's all about keeping our options open and making sure we're not locking ourselves into a corner. I hope that makes sense! Really appreciate you bringing this up, and it’s great having everyone chipping in with their thoughts.