linq能否同时插入多条记录,如果能,怎样实现?.
如题.
------解决方案--------------------new多个事例到list里
再InsertAll(list)
------解决方案--------------------
DataContext db = new DataContext ();
User[] users = new User[3]
{
new User {...},
new User {...},
new User {...},
};
db.Users.InsertAllOnSubmit(user);
db.SubmitChanges();
------解决方案--------------------创建多个实体对象!!