Skip to content
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

Whats new in EF9 docs #4823

Merged
merged 1 commit into from
Oct 2, 2024
Merged

Whats new in EF9 docs #4823

merged 1 commit into from
Oct 2, 2024

Conversation

maumar
Copy link
Contributor

@maumar maumar commented Sep 30, 2024

also:

Fixes #4765
Fixes #4805

@maumar maumar force-pushed the whats_new_ef9 branch 4 times, most recently from a70c6ae to c41c259 Compare September 30, 2024 09:55
_ = await GetPostsForceConstantCollection([1, 2, 3]);

#region ForceConstantPrimitiveCollection
async Task<List<Post>> GetPostsForceConstantCollection(int[] ids)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe better do something like:

var ids = [1, 2, 3];
var query = context.Posts
    .Where(e => e.Title == ".NET Blog" && EF.Constant(ids).Contains(e.Id))
    .ToListAsync();

rather than via method call? @roji

@maumar maumar force-pushed the whats_new_ef9 branch 3 times, most recently from d70bff9 to f73b7f5 Compare September 30, 2024 21:18
Copy link
Member

@roji roji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Mainly nits.

@@ -172,6 +172,8 @@ Math.Floor(d) | FLOOR(@d)
Math.Log(d) | LOG(@d)
Math.Log(a, newBase) | LOG(@a, @newBase)
Math.Log10(d) | LOG10(@d)
Math.Max(x, y) | GREATEST(@x, @y) | EF Core 9.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure any more, did we have an inferior translation here before or was it not working at all?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not supported before:

The LINQ expression 'DbSet<NullSemanticsEntity>()
    .Where(n => Math.Max(
        val1: n.Int, 
        val2: 14) > 20)' could not be translated. Additional information: Translation of method 'System.Math.Max' failed. 

entity-framework/core/what-is-new/ef-core-9.0/whatsnew.md Outdated Show resolved Hide resolved
entity-framework/core/what-is-new/ef-core-9.0/whatsnew.md Outdated Show resolved Hide resolved
entity-framework/core/what-is-new/ef-core-9.0/whatsnew.md Outdated Show resolved Hide resolved
entity-framework/core/what-is-new/ef-core-9.0/whatsnew.md Outdated Show resolved Hide resolved
FROM [Posts] AS [p]
```

<a name="azuresql-azuresynapse"></a>

### Better support for Azure SQL and Azure Synapse
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this one, I think we'll want to also document it inside the SQL Server provider docs (outside of the what's new) - and it would probably be a better idea to do both at the same time (and cross-link...), rather than having @cincuranet revisit this. But no big deal.

- Breaking change note for dotnet/efcore#33942
- Update function mappings

Fixes #4765
Fixes #4805
@maumar maumar merged commit 9395fff into main Oct 2, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants