Entity Framework - Migrations in SQL Server Database

preview_player
Показать описание
Code Based Migration. When you develop a new application, your data model changes frequently, and each time the model changes, it gets out of sync with the database. You have configured the Entity Framework to automatically drop and re-create the database each time you change the data model.

Рекомендации по теме
Комментарии
Автор

Hey friends, Hope you enjoyed and learned a lot in this video.

DotNetTrainingAcademy
Автор

It is very nice that you zoom in on the console when typing something. Helps guys like me with impaired vision. Great video. Cheers.

knubbigfluffigkatt
Автор

Good way to explain, when you said that is gonna be like Git, that really helped to understand! Thanks!

MohammedNoureldin
Автор

You solved me a ton of headaches cuz internet's friendly "have-a-lot-info-tutorials" started doing in mine

manueloviedo
Автор

hi
here i am trying to add a column to product table, as a first changes in database
i added a column ImageURL_add string
and in pm>
i run command add-migration addImageUrl_add

but its continuously showing error
PM> add-migration addImageURL_add
Exception calling "LoadFrom" with "1" argument(s): "Could not load file or assembly
file specified."
At char:5
+ $utilityAssembly = ...
+
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException

You cannot call a method on a null-valued expression.
At char:5
+ $dispatcher =
+
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull

Exception calling "CreateInstanceFrom" with "8" argument(s): "Could not load file or assembly
specified."
At char:5
+ $domain.CreateInstanceFrom(
+
+ CategoryInfo : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : FileNotFoundException


please help me

yogeshvaidya
Автор

By mistake Instead of typing add-migration "addedCourse" I typed update-database "addedCourse" and then got "build failed"... what is the issue?

lennonfernandes
Автор

hi could you pleas tell how could we connect out SQLEXPRESS database with entity framework because we use update-database it shows the error that instance of database was not found.

hassanjilani
Автор

Thanks for trying to speak English clearly, I appreciate that, thumbs up

loam
Автор

Hi, Can we create new table while data inserting into another table using code first?

gurikamalvlogs
Автор

How will I know what connection string to use?

kyou
Автор

Does migration history table has any data after 1st or 2nd update?

artemivanov
Автор

Please give the full documentation of Migration and the code in model that represent in real database such as Index, Relational, Default Value, Colum Type, ....

rabithbo
Автор

HI...Please upload more videos of this series.Thanks

girishparganiha
Автор

I got this message: "Enable-Migrations is obsolete. Use Add-Migration to start using Migrations."

NemanjaSimovic
Автор

No context type was found in the assembly 'IanEvents'

gitbunde
Автор

3 Steps to do:
o Enable-Migrations (only do this step once)
o Add-Migration "name of migration"
o Update-Database


--> Next migration
o Add-Migration "name of migration"
o Update-Database

miauw
Автор

Thanks for the amazing video ! It was really helpful :)

ИванинаЯнчева-эт
Автор

Very basic, was expecting something more. Probably the EF-hell problems

sujoyinnovates