BLToolKit: how to insert a list of objects?
2015-08-26 16:19
483 查看
Is it possible with BLToolKit (http://bltoolkit.net) to create a set of records for list of object (batch insert)?
If yes, how is this possible?
Thanks a lot!
answered 2010-11-26 17:06:54#1
answered 2010-11-26 17:18:00#2
Where
answered 2013-06-06 09:02:18#3
If yes, how is this possible?
Thanks a lot!
3 Answers
answered 2010-11-26 17:06:54#1using (var db = new DbManager()) db.InsertBatch(list);
answered 2010-11-26 17:18:00#2
using (var db = new DbManager()) { db.SetSpCommand("Person_Insert") .ExecuteForEach<Person>(list); }
Where
listis provided by other means of your application functionality.
answered 2013-06-06 09:02:18#3
using (var db = new DbManager()) { var ret = (from s in db.tablename select new ObjectList { Id = (int)s.Id, Name = s.Name }).ToList(); return ret; }
相关文章推荐
- FileOutputStream,BufferedOutputStream,对象的序列化与反序列化ObjectOutputStream
- ObjectiveC中的self.变量和_变量的区别
- superobject中 JavaToDelphiDateTime的使用
- iOS入门如何选择Swift和objective-c
- BLToolkit. Mapping ObjectToObject, without copy creation.
- c语言, objective code(new 1)
- Objective-C结合RAC实现KVO广播功能
- Java Reference Objects or How I Learned to Stop Worrying and Love OutOfMemoryError
- (译)Core Data Programming Guide 之 Managed Object Models
- staticMetaObject
- Objective-C 【动态类型检测&响应方法】
- Objective-C 【动态类型检测&响应方法】
- sqlserver sysobject 查找新增字段和修改字段
- Objective-C Runtime Reference
- 读Effective Objective C总结(三)
- MVVM设计模式基础知识--NotificationObject类(Prism框架)
- MVVM设计模式基础知识--NotificationObject类(Prism框架)
- iOS开发系列之Objective-C基础:NSString字符串类型(二)
- 黑马程序员——ios基础---Objective-C:构造方法、@property、MRC
- Objective-C之run loop详解