S
S
Sasha Pleshakov2016-09-26 19:29:16
C++ / C#
Sasha Pleshakov, 2016-09-26 19:29:16

How to generate an mdf file if the first call to the database is a select query?

There is a model, there is a context. The file seems to be generated when data is added to the table, but first I search for matches between the inserted data and what is in the table. How to be?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sasha Pleshakov, 2016-09-26
@mnepoh

My connection string was incorrect. In VS2015, you need to write not (localdb)\v11.0, but (localdb)\MSSQLLocalDB( source ).

M
MrDywar Pichugin, 2016-09-26
@Dywar

One in the title, another in the description.
Here is metanit.com/sharp/entityframework

R
Roman, 2016-09-27
@yarosroman

Database initialization metanit.com/sharp/entityframework/3.9.php please.
It's easier to make a unique index, and catch exceptions when inserting data that exists.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question