当前位置: 首页 > news >正文

怎么建个网站wordpress访问格式丢失

怎么建个网站,wordpress访问格式丢失,设计一套网站费用,快递公司网页模板最近在优化定时任务相关的代码#xff0c;建议是把总查询放到内存中去坐#xff0c;尽量减少打开的数据库连接 1. 内连接 指的是结果生成两张表可以连接的部分 private void button1_Click_1(object sender, EventArgs e){//初始化Student数组Student[] arrStu new Stude…最近在优化定时任务相关的代码建议是把总查询放到内存中去坐尽量减少打开的数据库连接 1. 内连接 指的是结果生成两张表可以连接的部分 private void button1_Click_1(object sender, EventArgs e){//初始化Student数组Student[] arrStu new Student[]{new Student{ID1,SNamezhangsan,Age20},new Student{ID2,SNamelisi,Age21},new Student{ID3,SNamewangwu,Age23},new Student{ID4,SNameliuliu,Age24},};//初始化Product数组Product[] arrPro new Product[]{new Product{ID1,PNameApple,Price2.25},new Product{ID2,PNameOrange,Price5.25},new Product{ID3,PNameBanana,Price7.5},new Product{ID4,PNameStrawBerry,Price6.5},};//标准查询运算符var query arrStu.Join(arrPro, s s.ID, p p.ID, (s, p) new { s.SName, s.Age, p.PName, p.Price });StringBuilder sbRes new StringBuilder();//打印foreach (var item in query){sbRes.AppendFormat(SName{0},Age{1},PName:{2},Price:{3}, item.SName, item.Age, item.PName, item.Price);sbRes.AppendLine();}MessageBox.Show(sbRes.ToString());} 或者另外一种写法 //LINQ语句var query from sItem in arrStujoin pItem in arrProon sItem.ID equals pItem.IDselect new { sItem.SName, sItem.Age, pItem.PName, pItem.Price };//Select后面接一个匿名对象 2.  分组连接 第一个集合中的每个元素与第二个集合中的一组相关元素进行配对 使用 into关键词 Person magnus new(FirstName: Magnus, LastName: Hedlund); Person terry new(Terry, Adams); Person charlotte new(Charlotte, Weiss); Person arlene new(Arlene, Huff);ListPerson people new() { magnus, terry, charlotte, arlene };ListPet pets new() {new(Name: Barley, Owner: terry),new(Boots, terry),new(Whiskers, charlotte),new(Blue Moon, terry),new(Daisy, magnus), };// Create a list where each element is an anonymous type // that contains the persons first name and a collection of // pets that are owned by them. var query from person in peoplejoin pet in pets on person equals pet.Owner into gjselect new{OwnerName person.FirstName,Pets gj};foreach (var v in query) {// Output the owners name.Console.WriteLine(${v.OwnerName}:);// Output each of the owners pets names.foreach (var pet in v.Pets){Console.WriteLine($ {pet.Name});} }/* Output:Magnus:DaisyTerry:BarleyBootsBlue MoonCharlotte:WhiskersArlene:*/ 3. 左外连接 简单理解就是基于第一张表无论第二章表是否有匹配项都放进去 左连接的数据 一定 大于等于 内连接 Person magnus new(Magnus, Hedlund); Person terry new(Terry, Adams); Person charlotte new(Charlotte, Weiss); Person arlene new(Arlene, Huff);Pet barley new(Barley, terry); Pet boots new(Boots, terry); Pet whiskers new(Whiskers, charlotte); Pet bluemoon new(Blue Moon, terry); Pet daisy new(Daisy, magnus);// Create two lists. ListPerson people new() { magnus, terry, charlotte, arlene }; ListPet pets new() { barley, boots, whiskers, bluemoon, daisy };var query from person in peoplejoin pet in pets on person equals pet.Owner into gjfrom subpet in gj.DefaultIfEmpty()select new{person.FirstName,PetName subpet?.Name ?? string.Empty};foreach (var v in query) {Console.WriteLine(${v.FirstName :,-15}{v.PetName}); }record class Person(string FirstName, string LastName); record class Pet(string Name, Person Owner);// This code produces the following output: // // Magnus: Daisy // Terry: Barley // Terry: Boots // Terry: Blue Moon // Charlotte: Whiskers // Arlene: reference 1. 执行左外部联接C# 中的 LINQ - C# | Microsoft Learn
http://www.huolong8.cn/news/62071/

相关文章:

  • 快手作品推广网站wordpress优化插件
  • 上海网络公司网站快速搭建网站推荐
  • 欧美风的网站设计app界面设计属于什么设计
  • 企业网站 设广西网站建设推广大概需要多少钱
  • 音频网站开发网站怎么添加滤镜功能吗
  • 邯郸网站建设安联网络公司三拼域名做网站
  • 四川建设厅网站网站开发项目的需求分析
  • 南京网站开发南京乐识赞仿懒人图库网站源码
  • 合肥寒假兼职工网站建设iis网站目录权限
  • 做网站着用什么电脑网络运营者应当对其收集的用户信息严格保密
  • 中国十大热门网站排名wordpress 摄影工作室主题
  • 建设公司官方网站个人社保缴费记录查询
  • 上海涛飞专业网站建设wordpress 小工具
  • 人流医院网站建设话费充值代理平台
  • 网站后台生成文章很慢基于php网站开发的参考文献
  • 建设网站石家庄博客seo优化技术
  • 如何使用好单库选品库做网站提供深圳网站制作公司
  • 网站开发 技术路线做集团网站一年多少钱
  • 长安网站建设多少钱百度百姓网
  • 后端开发网站做一些什么建网站大概多少费用
  • 静态网站可以申请域名吗如何自己做微信小程序
  • 网站设计参考网站互联网10大厂
  • 网站设计的机构wordpress添加分享
  • 自己切片做网站wordpress concise
  • 做八闽最好的中学网站南阳网站建设seo
  • 菏泽市建设局网站电话号码外网建筑设计网站
  • 视频分享网站怎么做的东莞个人免费建网站
  • 创建站点的方法做网站发布
  • 互联网做网站的话术南京营销型网站建设公司
  • 未来做哪些网站致富临海app开发