Butterfly
How the mgiration works internally?
For example, I have 5 migrations added and the sql database is updated with those 5 migrations. For some reasons, I had to roll back to the first migration by removing the four migrations. Now the question is
1. How does EF core works to which migration to roll back? My understanding is they compare with MigraitonHistory Table in the sql and check with snapshot.cs file to compare?
2. How Down methods are executed? I updated to the first migration means 4 migrations down methods are executed or not?
3. How the design.cs and snapshot.cs are used when updating the db using EF core? I think snapshot shows the current snapshot without the recent migration and design.cs has the data including the relevant migraiton file.
Could you guys fill me up?
2 replies
❔ Is there any tool converting csv file to Class (seeding data)?
I am using EF to seed data and I have an excel file containing like 500 records.
If that's around 100 or 200, I used to use just excel or VS code multi cursors.
I need to manually add data so I can't just read a file and convert it. I would like to find a way easily convert data in csv file to an object to seed data in Entity Framework.
3 replies
❔ Registering Angular App that's in IIS to .Net
I have an
Angular
app that will be hosed in the site/cc
. I would like C# to handle deep linking and for other reasons so I need to register that cc
virtual directory in IIS
. When I use wwwroot
, C# recognises the route but when I try to change site/wwwroot/cc
to site/cc
, it does not work. Is there any reason why wwwroot which is a default static folder is working and others not working? what Did I do wrong?
2 replies