Do you have any offer for master-detail i开发者_StackOverflownsert data into database? Do you use Transaction? What is the best practice for it? How do you control it in biz layer?
It all depends on the business rules. If it is ok for one insert to happen but not another then a transaction is not required. If however the business rules mean that each insert must occur together than yes, use a transaction.
Best practice is to understand and document the problem being solved to a sufficient degree to understand the situation and then design something that reflects that understanding - therefrore without the context we can not give a specific best practice recommendation. Although you could try to describe the context of the question and see if we can then be more specific
精彩评论