Comments (1)
事务的做法
using (var uow = orm.CreateUnitOfWork()) {
var repoA = orm.GetRepository<A>();
var repoB = orm.GetRepository<B>();
var a = new A();
repoA.Insert(a);
var b = new B { id = a.Id };
repoB.Insert(b);
uow.Commit();
}
from freesql.
Related Issues (20)
- Unity中正确导入FreeSql.Provider.MySqlConnector HOT 4
- InsertOrUpdate方法唯一索引bug HOT 2
- 能否实现 CTEs ,嵌套查询生成的sql , 索引容易匹配不正确 HOT 4
- postgres下插入只包含字符串的json会报错 HOT 2
- NativeAOT的Repository模式下更新失败
- 希望增加 fsql.Date() 方法,可以直接访问到数据库的当前时间 HOT 1
- 升级衍生bug,原功能 "Api 命名换成了 SetDtoIgnore,使用习惯与 SetSourceIgnore 一致" HOT 7
- 实体的属性的 Column 定义了 sql 返回中不存在的字段 报错 HOT 7
- 参数化异常 UseGenerateCommandParameterWithLambda(true) HOT 3
- 在Select中使用子查询Any 生成SQL有语法错误 HOT 2
- Sqlite 数据库子查询枚举转换问题 HOT 2
- 查询时枚举转 int再转字符串报错 referenced from scope '', but it is not defined HOT 1
- WithTempQuery HOT 1
- mysql连接数据库字符串如果密码里面带有分号则属于特殊字符,导致无法连接 HOT 1
- InsertOrUpdateDict中null值插入成空字符串'' HOT 8
- CreateInstance 导致可为空的DataTime 赋值为0001-01-01 时间问题 HOT 3
- SqlServer表列类型为TimeSpan,Update出现异常 HOT 2
- MySql 8.0.28 Emoji 字符 插入错误 HOT 3
- Where 方法 使用like 的奇怪现象 HOT 1
- 级联查询,能否提供一个只包含某些字段的功能
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freesql.