博客园中转

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年4月29日

摘要: Deleting dataDeletingAll Delete[...] methods return the number of records deleted.DeleteBy[...]Simple.Data:db.Users.DeleteById(1);SQL:DELETE FROM [Users] WHERE [Users].[Id] = @p1Delete (using Named Ar... 阅读全文
posted @ 2012-04-29 09:00 pieux 阅读(210) 评论(0) 推荐(0) 编辑

摘要: Inserting and updating dataA quick noteYou will notice that there are multiple ways to achieve the same thing here. Which you choose to use are up to you, but I recommend that you try and be consisten... 阅读全文
posted @ 2012-04-29 09:00 pieux 阅读(490) 评论(0) 推荐(0) 编辑

摘要: Finding dataDynamic Find methodsThe dynamic Table properties exposed by the Database object will accept a variety of methods starting with Find.FindBy[…]returns a singledynamicobjectFindAllBy[…]return... 阅读全文
posted @ 2012-04-29 08:54 pieux 阅读(709) 评论(0) 推荐(0) 编辑

摘要: Getting startedTo open aSQLServer database: var db = Database.OpenConnection("data source=.;initial catalog=Xyz;etc");To open aSQLServer Compact Edition 4.0 database var db = Database.OpenFile("mydb.s... 阅读全文
posted @ 2012-04-29 08:43 pieux 阅读(756) 评论(0) 推荐(0) 编辑