public IEnumerable <RSSettings> FindBySalesAreas(IEnumerable <string> salesAreas) => _mapper.Map <List <RSSettings> >( RSSettingsQuery .Include(x => x.SalesArea) .Where(x => salesAreas.Contains(x.SalesArea.Name)).AsNoTracking(), opts => opts.UseEntityCache(_salesAreaByIdCache));
public RSSettings Find(string salesArea) => _mapper.Map <RSSettings>( RSSettingsQuery .Include(x => x.SalesArea) .FirstOrDefault(x => x.SalesArea.Name == salesArea), opts => opts.UseEntityCache(_salesAreaByIdCache));