wp8 入门到精通 LINQ to SQL
http://msdn.microsoft.com/zh-cn/library/bb397924.aspx LINQ 查询操作中的类型关系 (C#)
使用一个人类发明快速检索的方法
// Northwnd inherits from System.Data.Linq.DataContext.
Northwnd nw = new Northwnd(@"northwnd.mdf");
// or, if you are not using SQL Server Express
// Northwnd nw = new Northwnd("Database=Northwind;Server=server_name;Integrated Security=SSPI"); var companyNameQuery =
from cust in nw.Customers
where cust.City == "London"
select cust.CompanyName; foreach (var customer in companyNameQuery)
{
Console.WriteLine(customer);
}
在上面的代码中,创建了 nw 对象来表示 Northwind 数据库,将 Customers 表作为目标,筛选出了来自 London的 Customers 行,并选择了一个表示 CompanyName 的字符串以进行检索。
执行循环时,将检索到 CompanyName 值的集合
http://msdn.microsoft.com/zh-cn/library/windowsphone/develop/bb399398(v=vs.100).aspx
http://www.cnblogs.com/lyj/archive/2008/01/28/1056133.html
Linq:基本语法form ,select, where(2)
http://www.cnblogs.com/liulun/archive/2009/06/02/1494740.html
时间排序
string[] datatime = { "2014-03-28 19:21:03", "2014-03-28 12:39:14", "2014-03-28 13:52:49", "2014-03-29 20:23:36", "2014-03-29 18:32:35", "2014-03-29 18:02:49", "2014-03-29 07:46:48", "2014-03-30 13:28:40", "2014-03-30 19:30:36", "2014-03-30 23:58:53" };
            List<Product> msgs = new List<Product>();
            for (int i = 0; i < datatime.Length; i++)
            {
                Product p1 = new Product();
                p1.Name = "张" + i + " ";
                p1.Age = Convert.ToString(20 + new Random().Next(0, 12));
                p1.Data = datatime[i];
                msgs.Add(p1);
            }
var dor = from d in msgs orderby d.Data select d;
this.listBox1.ItemsSource = dor;
using (PersonDB per = new PersonDB())
            {
                if (!per.DatabaseExists())
                    per.CreateDatabase();
Person p1 = new Person();
                p1.Name = "张三";
                p1.Age = 3;
                per.Persons.InsertOnSubmit(p1);
                Classes c1 = new Classes();
                c1.CName = "san";
                c1.Content = "111";
                per.Classesss.InsertOnSubmit(c1);
                per.SubmitChanges();
            }
这个俩个表都插入了
http://blog.csdn.net/qinyuanpei/article/details/23869275 [Unity3D]Unity3D游戏开发之仿仙剑奇侠传角色死亡效果实现
wp8 入门到精通 LINQ to SQL的更多相关文章
- wp8 入门到精通 虚拟标示符 设备ID
		//获得设备虚拟标示符 wp8 public string GetWindowsLiveAnonymousID() { object anid = new object(); string anony ... 
- wp8 入门到精通 WebClient Post
		WebClient wc = new WebClient(); var URI = new Uri("http://your_uri_goes_here"); //If any e ... 
- wp8 入门到精通 ---时间
		DateTime.Now.ToShortTimeString()DateTime dt = DateTime.Now;dt.ToString();//2005-11-5 13:21:25dt.ToFi ... 
- wp8 入门到精通 仿美拍评论黑白列表思路
		static bool isbool = false; private void BindGameDelete() { Tile tile = new Tile(); List<Color> ... 
- wp8 入门到精通 生命周期
- wp8 入门到精通 定时更新瓷贴
		public class ScheduledAgent : ScheduledTaskAgent { static ScheduledAgent() { Deployment.Current.Disp ... 
- wp8 入门到精通 ImageCompress 图片压缩
		//实例化选择器 PhotoChooserTask photoChooserTask = new PhotoChooserTask(); BitmapImage bimg; int newPixelW ... 
- wp8 入门到精通 Gallery
		<Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.Resources> ... 
- wp8 入门到精通 MultiMsgPrompt
		List<NotifyMsg> arraymsg = new List<NotifyMsg>(); List<NotifyInfo> ArrayNotifyInfo ... 
随机推荐
- 改变placeholder颜色
			/* WebKit browsers */ ::-webkit-input-placeholder { color: red; text-overflow: ellipsis; } /* Mozill ... 
- Iterator&Vector应用实例
			public class test1 { /** * @param args */ public static void main(String[] args) { // TODO Auto-gene ... 
- ios开发 网络编程浅析(一)
			iphone包含了很多框架和库,从底层的套接字到不同层次的封装,可以方便地给程序添加网络功能. (1)BSD套接字.最底层的套接字,这是Unix网络开发常用的API.如果从其他系统移植程序,而程序用的 ... 
- [实战]MVC5+EF6+MySql企业网盘实战(28)——其他列表
			写在前面 本篇文章将实现,其他文件类型的列表. 系列文章 [EF]vs15+ef6+mysql code first方式 [实战]MVC5+EF6+MySql企业网盘实战(1) [实战]MVC5+EF ... 
- Ubuntu无法关机解决办法
			说明:如果不成功请参考一下文章最后的内容,也许会有帮助. 其实不止在ubuntu里面,fedora里面我也遇到了这个问题,就是电脑可以重启,但是不能直接关机,否则就一直停在关机界面,需手动关机.郁闷很 ... 
- vsftpd 搭建与介绍
			CentOS Linux Vsftp服务器配置 CentOS Linux Vsftp服务器配置 1.开启防火墙ftp端口 vi /etc/sysconfig/iptables ... 
- git 笔记- 概念
			本文参考书中内容 http://cnpmjs.org/ 镜像文件 下载插件的镜像 可参考fis 对于任何一个文件,在Git 内都只有三 种状态:已提交(committed),已修改(modified) ... 
- topo排序 + 用邻接表优化后的
			输入数据: 4 61 21 32 33 42 44 2 4 61 21 32 33 42 41 2 topo排序为偏序: #include<stdio.h> #include<que ... 
- HDU 1018 Big Number (数学题)
			题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1018 解题报告:输入一个n,求n!有多少位. 首先任意一个数 x 的位数 = (int)log10(x ... 
- HDU 2577 How to Type(dp题)
			题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2577 解题报告:有一个长度在100以内的字符串,并且这个字符串只有大写和小写字母组成,现在要把这些字符 ... 
