Exemplo n.º 1
0
        public static async Task <T> FindByIdRawAsync <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.SimpleSearchRawAsync(search, modify)).OnlySingle());
        }
Exemplo n.º 2
0
 public static async Task <List <V> > SimpleSearchAsync <V, T, E, S>(
     this IViewSource <V, T, E, S> source, S search, Func <IQueryable <E>, IQueryable <E> > modify = null)
     where V : IIdView where S : IIdSearcher where E : EntityGroup
 {
     return((await source.SimpleSearchRawAsync(search, modify)).Select(x => source.ToView(x)).ToList());
 }