Esempio n. 1
0
        public List <T> FindByTag <T>(List <string> tags) where T : class, new()
        {
            var name = typeof(T).Name;

            //Type typeParameterType = typeof(T);
            switch (name)
            {
            case "Analytic":
                var list = Analytics.AsQueryable().Where(a => a.Tags.ContainsAll(tags)).Cast <T>().ToList();
                return(list);

            default:
                return(null);
            }
        }
Esempio n. 2
0
        public List <Domain.Analytic> FindAnalyticsByTag(List <string> tags)
        {
            //var list = Analytics.AsQueryable().Where(a => a.Tags.ContainsAny(tags)).Cast<T>().ToList(); //not supported

            return(Analytics.AsQueryable().Where(a => a.Tags.ContainsAll(tags)).ToList());
        }