コード例 #1
0
        private EntityServerModeSource GetEntityServerModeSource()
        {
            EntityServerModeSource esms = new EntityServerModeSource();

            esms.QueryableSource = DataContext.Products;
            esms.KeyExpression   = "ProductID";

            return(esms);
        }
コード例 #2
0
    private EntityServerModeSource GetEntityServerModeSource()
    {
        EntityServerModeSource esms = new EntityServerModeSource();

        esms.QueryableSource = new NorthwindModel.NorthwindEntities().Products;
        esms.KeyExpression   = "ProductID";

        return(esms);
    }
コード例 #3
0
        private EntityServerModeSource GetEntityDataSource()
        {
            EntityServerModeSource esms = new EntityServerModeSource();

            esms.KeyExpression = "UID";
            var model = userRepo.GetAllUsers().Where(x => x.UserRole == "RE");

            esms.QueryableSource = model;
            return(esms);
        }
コード例 #4
0
        private EntityServerModeSource GetEtntityDataSource(string key)
        {
            EntityServerModeSource esms = new EntityServerModeSource();

            esms.KeyExpression = "WID";
            if (key != null)
            {
                PUBLICKEY = key;
                var model = scheduleRepo.GetAllSchedules().Where(x => x.PublicKey == key);
                esms.QueryableSource = model;
                return(esms);
            }
            esms.QueryableSource = null;
            return(esms);
        }