You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 in DomainServiceDescriptionTest.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. `
UpdateTestswhich have several subclasses is one such instance. (withDbCtxUpdateTests andEFCFUpdateTests` as subclasses today),
is QueryTests also relevant ?
Look into the ProviderType enum 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 uses Catalog_EFDbCtx.g.cs and similar tests such as Northwind_EF.g.cs/vb and make EFCOre versions of them
They seems to exist in CodeGenDomainServices see TestCatalogEFClientProxies and TestNorthwindEFClientProxies
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's IModel since 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 EFCoreTypeDescriptor and unit tests similar to DomainServiceDescriptionTest.ComplexType_EFProviderTest added.
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 in Catalog_EFDbCtx.g.cs to match the EF6 version.
Future improvement
Investigate to use compiled models instead of activator in EFCoreTypeDescriptionContext.cs (requires newer version of EF Core)
The text was updated successfully, but these errors were encountered:
make OpenRiaServices.EntityFramework
Test
"DomainServiceDescription" (there seems to be existing tests in
DomainServiceDescriptionTest.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)which have several subclasses is one such instance. (with
DbCtxUpdateTestsand
EFCFUpdateTests` as subclasses today),QueryTests
also relevant ?ProviderType
enum and it's usage, we probable want a new value EFCore or similar.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 uses
Catalog_EFDbCtx.g.cs
and similar tests such asNorthwind_EF.g.cs/vb
and make EFCOre versions of themThey seems to exist in
CodeGenDomainServices
seeTestCatalogEFClientProxies
andTestNorthwindEFClientProxies
Documentation (before release)
"Tooling" / Visual Studio
BusinessLogicClass_Context_EFCoreDbContextTest
(commented out) by building a similar thing as LinqToEntitiesDbContext but using EF Core'sIModel
since current LinqToEntitiesDbContext uses EF6 metadata modelReleasing
Not supported / limited support
EFCoreTypeDescriptor
and unit tests similar toDomainServiceDescriptionTest.ComplexType_EFProviderTest
added.RoundtripOriginalAttribute
s in the generated code inCatalog_EFDbCtx.g.cs
to match the EF6 version.Future improvement
EFCoreTypeDescriptionContext.cs
(requires newer version of EF Core)The text was updated successfully, but these errors were encountered: