-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8.0 API Reviews #30306
Comments
Part of #30306 - Make DbContextOptionsBuilder.ResolveRootApplicationServiceProvider a parameterless overload of UseRootApplicationServiceProvider - Make NavigationEntry.LoadWithIdentityResolution an overload of Load with a flags enum with a ForceIdentityResolution value - Ensure all interceptor data classes (including MaterializationInterceptionData) have pubternal ctors - Move the serviceType parameter to the second position in IConventionEntityType.AddServiceProperty - Collapse the overloads of RuntimeEntityType.AddServiceProperty. A serviceType of null means the type is inferred. - Add *Is* prefix to RelationalOptionsExtension.ConnectionOwned - Make the parameter names of SqlServerDbFunctionsExtensions.DateDiffMillisecond consistent with other functions (e.g. Rename startTime to startTimeSpan) - Instead of adding ignoreNonVirtualNavigations to ProxiesExtensions.UseLazyLoadingProxies, add a nested closure overload with a builder. The builder overload shouldn't include the useproxies parameter.
Part of #30306 - Make DbContextOptionsBuilder.ResolveRootApplicationServiceProvider a parameterless overload of UseRootApplicationServiceProvider - Make NavigationEntry.LoadWithIdentityResolution an overload of Load with a flags enum with a ForceIdentityResolution value - Ensure all interceptor data classes (including MaterializationInterceptionData) have pubternal ctors - Move the serviceType parameter to the second position in IConventionEntityType.AddServiceProperty - Collapse the overloads of RuntimeEntityType.AddServiceProperty. A serviceType of null means the type is inferred. - Add *Is* prefix to RelationalOptionsExtension.ConnectionOwned - Make the parameter names of SqlServerDbFunctionsExtensions.DateDiffMillisecond consistent with other functions (e.g. Rename startTime to startTimeSpan) - Instead of adding ignoreNonVirtualNavigations to ProxiesExtensions.UseLazyLoadingProxies, add a nested closure overload with a builder. The builder overload shouldn't include the useproxies parameter.
Changes: - Make HierarchyId compatible with System.Text.Json (resolves efcore/EFCore.SqlServer.HierarchyId#40) - Add HierarchyId constructors - Add overloads and clarify docs for GetDescendant - Improve interop with SqlHierarchyId - Translate calls on constants (fixes dotnet#30307) - Don't go through SqlBytes (resolves dotnet#30305) Part of dotnet#30306
Changes: - Make HierarchyId compatible with System.Text.Json (resolves efcore/EFCore.SqlServer.HierarchyId#40) - Add HierarchyId constructors - Add overloads and clarify docs for GetDescendant - Improve interop with SqlHierarchyId - Translate calls on constants (fixes dotnet#30307) - Don't go through SqlBytes (resolves dotnet#30305) - Add API consistency tests Part of dotnet#30306
It seems a binary breaking change was recently made to the I don't see it listed in https://learn.microsoft.com/en-us/ef/core/what-is-new/ef-core-8.0/breaking-changes. Is it an omission? FWIW, it breaks OpenIddict, that relies on this API: openiddict/openiddict-core#1789 |
The changed Is there a suggested workaround to preserve the old behavior? The keys are indeed shadow properties. The parent resource is in the change tracker and we're calling |
@bkoelman Please file a new issue and attach a small, runnable project or post a small, runnable code listing that reproduces what you are seeing so that we can investigate. |
@ajcvickers and my question? I guess you don't plan on reverting this change to avoid the impact it has on existing projects? |
@kevinchalet it's difficult to answer your question when you haven't provided a code sample that shows what you're asking about... Please open a new issue with that so we can investigate further. |
@roji I'm not sure why you'd need a code sample for such a trivial question. Let me rephrase it: EF Core 7.0 (and earlier) has the following
This API was removed in EF Core 8.0 (without being obsoleted first, BTW...) and replaced by:
You can easily see that the signature has changed in a breaking way (an optional parameter has been added), which causes So my question is: why wasn't this binary breaking change announced and do you plan to keep it in the final version of EF Core? |
From a semantic standpoint Azure SQL is a strict subset of SQL Server and so it makes sense to find |
The main point here for me is to make the distinction between SQL Server and Azure SQL clear to users. SQL Server is generally used to denote the on-premise product, so it's quite odd to do UseSqlServer() and specify inside that it happens to be AzureSQL (again, purely from a user perspective).
I don't think it should be a problem to add those same overloads for a completely different name (i.e. UseAzureSql alongside UseSqlServer), no? the user still makes the choice of UseSqlServer vs. UseAzureSql first. |
That follows marketing terms more than the underlying technology and it might be confusing for some products, such as Azure SQL Managed Instance, or when the marketing terminology changes. It might make it clearer if we rename |
That's true, but that confusion is already there without changing UseSqlServer to UseAzureSql (and also if we rename to ApplyAzureSqlDefaults). Let's maybe have a design discussion on this when you're back... |
@roji @AndriySvyryd is this for special casing of for example retry strategies? |
For now, yes. But it could also enable certain features in the future. |
@bricelam What does, "Fix the namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.Json" mean? |
…ow needed for the compiled model Part of #30306
@ajcvickers Put the |
Note from triage: use |
As a team, we periodically review changes made to the public API. This issue tracks follow-up items that come out of those reviews for the 8.0 release.
Feb 3
Done
Ensure all parameter object types (including EntityMaterializerSourceParameters) have pubternal ctorsWithOverride
orOverrideWith
.)May 15
Done
HasSentinel
Collection
is redundant (note that we'd also have to do it forParameterQueryRootExpression
)... For comparison, existing type names for query roots areEntityQueryRootExpression
,SqlQueryRootExpression
andTableValuedFunctionQueryRootExpression
; I thinkInlineQueryRootExpression
andParameterQueryRootExpression
fit well into this and are reasonably descriptive - but let me know if there are strong feelings here and I will change.DateTime.TryFormat
is a good example of an API which behaves just like this. The rest of the name is a bit long/wonky, but I can't really come up with some better... In some cases we have aSelectExpression
wrapping something where theSelectExpression
doesn't actually need to be generated in SQL (one example isX UNION y
, which we represent as wrapped by aSelectExpression
although it isn't outputted). This method is what identifies these cases and also writes the SQL out; we could also shorten this toTryGenerateUnwrapped
, which is shorter but less descriptive - am open to other ideas.July 14
Done
July 28
Done
Sept 8
Done
bool
parameter on IMutableProperty.ElementType and friends to primitiveCollection@roji@ajcvickers Fix the namespace Microsoft.EntityFrameworkCore.Sqlite.Storage.Internal.JsonSept 15
Done
Punted
The text was updated successfully, but these errors were encountered: