上一页 1 2 3 4 5 6 7 8 9 10 ··· 32 下一页

Linq 2 Entity Framework: Cannot convert lambda expression to type 'string' because it is not a delegate type

摘要: 出错代码: var x = from c in Database.Company select c; 错误提示: Cannot convert lambda expression to type 'string' because it is not a delegate type 解决方法: 添加"using System.Linq;"行.出错原因:C#编译器未找到合适的Select方法来翻译"s... 阅读全文
posted @ 2008-09-11 16:34 deerchao 阅读(1472) 评论(0) 推荐(0) 编辑

A class to clone objects

摘要: [代码] 阅读全文
posted @ 2008-09-04 16:02 deerchao 阅读(405) 评论(0) 推荐(0) 编辑

Some tips about ubuntu server | or it may works on other linux distributions too

摘要: Mount usb-hdd/usb-flash disk to Ubuntu Server: 1, plug the hardware 2, run below command, see which maybe the device name tail -f /var/log/messages 3, mount it sudo mount -t <file system type|vfa... 阅读全文
posted @ 2008-08-29 15:24 deerchao 阅读(358) 评论(0) 推荐(0) 编辑

对Ado.net Entity Data Model Designer很失望

摘要: 1,无法根据Entity Model自动生成Database schema2,不会自动调整Entity, Property, Relationship名称的单复数形式(这可是连Linq 2 Sql Designer都能做到的事..)3,关闭edmx文件后,再次双击无法打开.只能关闭solution,重新加载solution,然后再打开..另外,感觉EDM本身目前真的不成熟,不过前途很光明,过个三五... 阅读全文
posted @ 2008-08-18 17:07 deerchao 阅读(1910) 评论(3) 推荐(0) 编辑

collection.All(x=> whatever(x)) 与 collection.Any(x=>whatever(x))

摘要: 命题:如果一个集合里每个元素都满足某个条件,则此任集合内至少有一个元素满足此条件.命题错误:var list = new string[0];var all = list.All(x => x.Length == -1) ; // all == truevar any = list.Any(x => x.Length == -1); // any == false注意, 即使如此, 仍然有以下关系成立:!a.Any(x => whatever(x)) == a.All(x => !whatever(x)) 阅读全文
posted @ 2008-08-11 16:12 deerchao 阅读(374) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 32 下一页