private static int GetCustomerId(CachedRepository cachedRepository, IEnumerable<string> names) { return cachedRepository.All<Customer>().Where(x => names.Contains(x.Name)).Select(x => x.Id).FirstOrDefault(); }
private static int GetCustomerId(CachedRepository cachedRepository, string name) { return cachedRepository.All<Customer>().Where(x => x.Name == name).Select(x => x.Id).FirstOrDefault(); }