Query

Sep 3, 2014 at 12:36 PM
Hello,

how do I use Contains or Any inside Query?
my sample:
var userRegion = _regionService.GetRegionByUser(User.Identity.GetUserId<int>());
var query = _regionService.Query(r => userRegion.Select(s => s.Kod).Contains(r.Kod))
            .Include(r => r.DeliveryPlace)
            .OrderBy(r =>
            r.OrderBy(e => e.Kod)).Select(r => new RegionViewModel
            {
                Id = r.Id,
                Kod = r.Kod,
                .........
            });
Coordinator
Sep 12, 2014 at 10:15 PM
Marked as answer by lelong37 on 9/12/2014 at 3:15 PM