时间:2021-07-01 10:21:17 帮助过:4人阅读
string connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["ConsoleApp55.Properties.Settings.mydbConnectionString"].ToString();
ConsoleApp55.DataClasses1DataContext db = new DataClasses1DataContext(connectionString);
mt2 mymt = new mt2();
mymt.id = Guid.NewGuid();
mymt.name = "SLJ";
db.mt2s.InsertOnSubmit(mymt);
db.SubmitChanges();
mt2 secondMt = db.mt2s.FirstOrDefault(x => x.name.Equals("SLJ"));
Console.WriteLine("Id={0},Name={1}", secondMt.id, secondMt.name);
Console.ReadLine();
LinqToSql
标签:nec ring guid cond sys lin acl uid str