简体   繁体   中英

What is the best way to remove MS Entity Framework facilities from Prism 6 WPF application?

I had added Entity Framework (using Code First - pure code approach) in Prism module which is in my WPF Prism 6 modular application. The name of this module is 'Authorization'. You can see it below at the picture:

在此处输入图片说明

Where 'AuthorizationLevel' and 'UserCredential' classes (in 'EfClasses' folder) are entity classes and 'UserCredentialsContext' class in 'EfClasses' folder is class derived from DbContext type. Also you can see from the picture that Entity Framework facilities were added to Properties ('DataSources' folder), Resources and Settings. But some time later I revealed that Entity Framework is not needed in my application. So I should remove Entity Framework facilities from my application. What is the best way to remove it from my application without crippling and corrupting of my application?

I'll put the solution here so hopefully this will not fall into the 'unanswered' category.

With Nuget packages more often than not you can uninstall them using nuget, in my experience this is a pretty fast and painless solution.

  1. Open Package Manager Console
  2. Discover the correct name of the package you wish to uninstall
  3. Type the string into the package manager console then press enter , eg

UnInstall-Package EntityFramework -Version 6.0.2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM