-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
Milestone
Description
- Create EFCore versions of relevant EF based projects
- OpenRiaServices.Server.EntityFramework / OpenRiaServices.Server.EFCore
make OpenRiaServices.EntityFramework - Only the DbContecxt related classes are relevant (DbDomainService and it's attribute), however some things are delegated to the original classes made for "LinqToEntities" (ObjectContext) so it is not as easy to just ignore everything related to ObjectContext since it might be used internally.
- The public API surface should only contain a single DomainService type, attribute etc, since there is only "one way" to do EF core and not all the variants of EF6 (ObjectContext, POCO, DbContext with edmx, DbContext code first ..)
- Give public types simple but descriptive names
- OpenRiaServices.Server.EntityFramework / OpenRiaServices.Server.EFCore
Test
- EFCore model for AdventureWorks and Northwind (similar to EFDbContextModels) projects
- Ensure that we don't only use DataAanotations but use EF core "configuration" api to setup Keys etc.
- OpenRiaServices.Common.DomainServices.Test
- Add Adventureworks "catalog" service (should be able to copy from EF DbContexct)
- Add "Northwind" service similar to "EFDbCtx_Northwind"
- Ensure we have unit tests for the
"DomainServiceDescription" (there seems to be existing tests inDomainServiceDescriptionTest.cs`). The code generation tests might cover most of the things we would cover here. (That the correct attributes are discovered/added based on EF core model) - Add functional E2E tests in Client
- Find tests which uses NorthwindContext or adwentureworks and which have variants for different ORM's. `
- UpdateTests
which have several subclasses is one such instance. (withDbCtxUpdateTestsandEFCFUpdateTests` as subclasses today), - is
QueryTestsalso relevant ? - Look into the
ProviderTypeenum and it's usage, we probable want a new value EFCore or similar.
- Add code generation tests (OpenRiaServices.Tools.* test projects)
store baselines in same place as others, assuming the EFCore version of the domainservices/models can be the same as the EF6 version the output of the code generation should be identitcal to that of EF6.
- Identify code generation tests which EF usesCatalog_EFDbCtx.g.csand similar tests such asNorthwind_EF.g.cs/vband make EFCOre versions of them
They seems to exist inCodeGenDomainServicesseeTestCatalogEFClientProxiesandTestNorthwindEFClientProxies
Documentation (before release)
- Write a getting started guide for ef core (should cover installing the nuget and adding a domain service)
- Update docs so it mentions ef core support
"Tooling" / Visual Studio
- Adding support to VisualStudio integration and tooling to discover EFCore DbContext is not a top priority. It can preferably be done once everything else works fine.
- Update related test such as
BusinessLogicClass_Context_EFCoreDbContextTest(commented out) by building a similar thing as LinqToEntitiesDbContext but using EF Core'sIModelsince current LinqToEntitiesDbContext uses EF6 metadata model
Releasing
- new nuget OpenRiaServices.Server.EFCore / EntityFrameworkCore
- getting started documentation or update existing
- look into adding support to tooling
Not supported / limited support
- Support for owned entities (in EF 6 represented ComplexTypes), is limited/untested. Modifications may be required in
EFCoreTypeDescriptorand unit tests similar toDomainServiceDescriptionTest.ComplexType_EFProviderTestadded. - M2M should be supported but only using link entities. Further testing might be required. Especially the Adventure Works model should be extended to contain all its entities to being able to get the
RoundtripOriginalAttributes in the generated code inCatalog_EFDbCtx.g.csto match the EF6 version.
Future improvement
- Investigate to use compiled models instead of activator in
EFCoreTypeDescriptionContext.cs(requires newer version of EF Core)
dsoltesz