public IQueryable <Category> GetCategoriesWith(params string[] includeFields)
    {
        var categories = Categories.AsQueryable();

        foreach (string includeField in includeFields)
        {
            categories = categories.Include(includeField);
        }
        return(categories);
    }
Beispiel #2
0
 internal IQueryable <T> GetQuerable <T>()
 {
     if (typeof(T) == typeof(Category))
     {
         return(Categories.AsQueryable() as IQueryable <T>);
     }
     if (typeof(T) == typeof(DataPoint))
     {
         return(DataPoints.AsQueryable() as IQueryable <T>);
     }
     return(null);
 }
Beispiel #3
0
 public IQueryable <Category> GetCategories() => Categories.AsQueryable();