Skip to content

How to turn IDENTITY_INSERT ON #154

@Sirozha1337

Description

@Sirozha1337

Hi,

I'm trying to use Effort for testing in my project. I use Database first approach, create connection this way:
_connection = EntityConnectionFactory.CreateTransient("name=MyEntities");

I have a table in my DB with an ID column IDENTITY (1, 1). I want to insert a record into this column with ID=10, but it changes this ID to 1. I've seen examples on the web that use _connection.DbManager to set identity insert to ON, but there's no DbManager for EntityConnection.

How do I turn on IDENTITY_INSERT for my connection?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions