没有SQL的ADO.net更新?(ADO.net update without SQL?)
这可能是一个愚蠢的问题。 但ADO.net是否支持更新到数据库而无需编写SQL命令?
示例:我有一个从数据库读取并将行保留在内存中的方法。 然后我修改了一些行。 那么可以让ADO.net更新数据库的最新更改,而不必编写更新SQL语句,而是让ADO.net弄清楚吗?
我问这个是因为我可能想在稍后更新。 我可以将SQL语句存储在一个列表中,但之后我会做很多更新,而不是只需要一个大的更新,这需要更长的时间。
This might be a dumb question. But does ADO.net support updating to a database without having to write SQL commands?
Example: I have a method that reads from database and keeps the rows in memory. I then modify some of the rows. Is it then possible to make ADO.net update the newest changes to the database without having to write an update SQL statements but instead let ADO.net figure it out?
I am asking this because I might want to update at a much later point. I could just store the SQL statements in a list but then I would be doing many updates instead of just one big one which would take longer time.
原文:https://stackoverflow.com/questions/10074247