public void GetViewDefinitions_Test()
        {
            var org = OrganizationHelper.AdminService;

            var service = new DynamicsMetaDataService(org);

            var views = service.EntityViewDefinitionsGet("account");
        }
        public void GetEntityDefinition_Test()
        {
            var org = OrganizationHelper.AdminService;

            var service = new DynamicsMetaDataService(org);

            var entity = service.EntityDefinitionGet("account");
        }
        public void GetViewDefinition_Test()
        {
            var org = OrganizationHelper.AdminService;

            var service = new DynamicsMetaDataService(org);

            var view = service.EntityViewDefinitionsGet("account").FirstOrDefault();

            var viewDefinition = service.EntityViewDefinitionGet(view.SavedQueryId);
        }
        public void GetViewDefinitionObjectGraph_Test()
        {
            var org = OrganizationHelper.AdminService;

            var service = new DynamicsMetaDataService(org);

            var view = service.EntityViewDefinitionsGet("account").FirstOrDefault();

            var graph = service.FetchXmlObjectGraphGet(view.FetchXml);
        }
        public void GetViewDataBySavedQueryId_Test()
        {
            var metaDataService = new DynamicsMetaDataService(OrganizationHelper.AdminService);

            var dataAccessService = new DynamicsDataAccessHelperService(OrganizationHelper.UserService, metaDataService);

            var view = metaDataService.EntityViewDefinitionsGet("account").FirstOrDefault();

            var viewDefinition = metaDataService.EntityViewDefinitionGet(view.SavedQueryId);

            var data = dataAccessService.GetDataUsingSavedQuery(viewDefinition.SavedQueryId);
        }