开发者

Bltoolkit - Dealing with identity with multiple db's

开发者 https://www.devze.com 2023-04-04 06:31 出处:网络
How do I deal with identity when I\'m supporting multiple db\'s with Bltoolkit. I know that BL supports InsertWithIdentity call with linq 开发者_Go百科whne doing inserts, but I think it only works wit

How do I deal with identity when I'm supporting multiple db's with Bltoolkit. I know that BL supports InsertWithIdentity call with linq 开发者_Go百科whne doing inserts, but I think it only works with Sql Server and in this instance I don't want to use it in this instance

Is their a better way doing. Pehaps creating some kind of identity map to store the last primary key value for a particular entity stored.

Any advice would be helpful. Thanks scope_creep


MySql supports AUTO_INCREMENT, so it's not a problem.

For Oracle there are two ways to implement identity:

  1. Define a trigger.
  2. Use a sequence.
0

精彩评论

暂无评论...
验证码 换一张
取 消