public override Task <List <V> > PreparedSearchAsync(S search, Requester requester)
        {
            logger.LogTrace($"{typeof(V)} SearchAsync called by {requester}");

            return(converter.SimpleSearchAsync(search, (q) =>
                                               services.permissions.PermissionWhere(q, requester, Keys.ReadAction)
                                               ));
        }
Example #2
0
        public static async Task <V> FindByIdAsync <V, T, E, S>(
            this IViewSource <V, T, E, S> source, long id, Func <IQueryable <E>, IQueryable <E> > modify = null)
            where V : IIdView where S : IIdSearcher, new() where E : EntityGroup
        {
            var search = new S();

            search.Ids.Add(id);
            return((await source.SimpleSearchAsync(search, modify)).OnlySingle());
        }