Share via

Do I have to Manually remove EF6 seeding code from ASP.NET Core 6 before publishing ?

Abdurhman Alsobhi 21 Reputation points
2022-03-20T18:07:35.34+00:00

Do I have to manually remove

  • EF6 seeding code
  • ensureDeleted() and ensureCreated() from ASP.NET Core 6 before publishing ?
Developer technologies | ASP.NET Core | Other

1 answer

Sort by: Most helpful
  1. Anonymous
    2022-03-21T03:09:43.387+00:00

    Hi AbdurhmanAlsobhi-0201,

    This is depend on your actually environment, for example, if you want to store some data when your application started after our application hosted at the server and the database is new generated.

    For the ensureDeleted() and ensureCreated() , these methods are useful in scenarios when the data is transient and can be dropped when the schema changes. For example during prototyping, in tests, or for local caches.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.