控制台程序操作Dynamic数据

using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; //需要引用的包 using Microsoft.Xrm.Sdk; using Microsoft.Xrm.Sdk.Client; using Microsoft.Xrm.Sdk.Query; using System.ServiceModel; using System.ServiceModel.Description; namespace IndexDB_Access { public class Program { //连接服务,进行CRUD操作 Uri orgServiceUri = new Uri("http://10.20.100.150:7777/Index/XRMServices/2011/Organization.svc"); ClientCredentials clientCredentials = new ClientCredentials(); public void Run() { clientCredentials.Windows.ClientCredential = new NetworkCredential("lanhai", "P@ssw0rd", "LANHAI"); try { using (OrganizationServiceProxy sev = new OrganizationServiceProxy(orgServiceUri, null, clientCredentials, null)) { Console.WriteLine("连接成功!域名为:LANHAI"); Console.WriteLine("登录名为:lanhai"); Console.WriteLine($"组织服务:{orgServiceUri.AbsoluteUri}"); sev.EnableProxyTypes(); //添加一条实体信息 Console.WriteLine("1.添加"); Console.WriteLine("2.查询"); Console.WriteLine("3.修改"); Console.WriteLine("4.删除"); Console.Write("输入需要进行的操作:"); int num=Convert.ToInt32(Console.ReadLine()); bool f = true;

上一篇:jmeter5.3


下一篇:AQS学习(二) AQS互斥模式与ReenterLock可重入锁原理解析