我有如下输入数据10 med tot 110 10 med tot 120 10 dent tot 140 20med tot 110 20 dent tot 130 20 med tot 120CovNo type Price
10Group tot 370 20 med tot 110 20 dent tot 130 20 med tot 120
大家早上好,
我正在做一个项目,在这个项目中,我将数据保存到Mongo DB和Sql Server (首先是实体框架代码)。在许多情况下,我在单个代码块中执行对每个数据库的写入。我想知道,你们中有谁能建议一种类似于事务的方法来处理这个问题吗?这样,如果代码块的任何部分失败,整个代码块都应该失败并回滚?