开发者

Using Entity Framework with MyIsam tables

Got a question about Entity Framework and MyIsam tables.

My production database consists of MyIsam tables only. Often with a primary key li开发者_StackOverflowke UserId and then a secondary KeyId that is auto incrementary.

Since secondary auto incremantary keys are not allowed in InnoDb, and there will be ALOT of work to get rid of them before converting, I'm thinking about using MyIsam tables with Entity Framework instead.

The question is, how do I set up this? With no foreign keys there will be no relationships when adding the tables to the EF model. I've tried adding the associations manually but always with some errors. Is this even possible when using a secondary auto increment key?

I would be very grateful if someone could try helping me.

Thanks

/Andreas


Apparantly this wasn't hard at all. I think i misunderstood how to use referential constraints. Anyway, for future reference and people finding this question:

Just add an association between the entities and then add a referential constraint using the desired entity keys, without even thinking about the secondary auto increment key. It all works out anyway..

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜