mehrandvd
mehrandvd

Reputation: 9116

How to use Entity Framework Core in XAF

Is it possible to use Entity Framework Core 1 (formerly Entity Framework 7) in XAF (eXpress Application Framework)?

Upvotes: 0

Views: 1046

Answers (4)

Dennis Garavsky
Dennis Garavsky

Reputation: 538

Yes, DevExpress Cross-Platform .NET App UI (XAF) and its backend Web API Service provide a "first-class citizen" support for Microsoft Entity Framework Core (EF Core). Supported versions include:

  • EF Core 7 in XAF v23.1+
  • EF Core 6 in XAF v22.2+
  • EF Core 5 in XAF v20.2-v22.1
  • EF Core 3 in XAF v20.1-v20.2

DevExpress also recommends EF Core over XPO ORM for new XAF development and new XAF projects target EF Core by default.

For more information, follow Business Model Design with Entity Framework Core and Getting Started.

Upvotes: 2

Kirsten
Kirsten

Reputation: 18160

XAF 22.2.3 supports EFCore 6.0.3 Note when upgrading old projects the primary keys in the security system have changed to GUIDS.

Upvotes: 1

Kirsten
Kirsten

Reputation: 18160

I managed to do the migration by creating a new .net core5 project from the wizard and then moving my classes into the new project. Unfortunately The .Net5 security tables are different to those that the framework project uses so I wont be able to do a staged roll out.

Upvotes: 1

natemcmaster
natemcmaster

Reputation: 26813

Yes.

Does XAF support Microsoft’s Entity Framework?

Yes. XAF provides support for Entity Framework. You can use your existing EF data models in order to generate an XAF application. Please review the Business Model Design page to learn more.

From https://www.devexpress.com/Products/NET/Application_Framework/presales-faq.xml

UPDATE To clarify, it is possible to use EF Core because XAF runs on .NET. If what you are asking is "does XAF work out-of-box with EF Core?" the answer is no. XAF's baked-in class EFObjectSpace is for EF6 and older because it relies on the ObjectContext API. EF Core does not support the ObjectContext API.

Upvotes: 2

Related Questions