-
Notifications
You must be signed in to change notification settings - Fork 27
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
Adding DbSet/IQueryiable helpers to deal with EF Core async and nullable methods #94
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
simon-reynolds
approved these changes
May 25, 2021
Hi @lucasteles |
simon-reynolds
added a commit
that referenced
this pull request
May 27, 2021
## [5.0.3-beta003] - 2021-05-27 ### Added - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-alpha10...HEAD [5.0.3-alpha10]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-alpha10 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-beta001...HEAD [5.0.3-beta001]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta001 [5.0.3-alpha10]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-alpha10 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-alpha10...HEAD [5.0.3-alpha10]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-alpha10 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-beta002...HEAD [5.0.3-beta002]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta002 [5.0.3-beta001]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta001 [5.0.3-alpha10]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-alpha10 ### Fixed - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70
simon-reynolds
added a commit
that referenced
this pull request
Jun 16, 2021
## [5.0.3-beta004] - 2021-06-16 ### Added - Single case union support - [@lucasteles](https://github.com/lucasteles) - #98 - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-beta002...HEAD [5.0.3-beta002]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta002 [5.0.3-beta001]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta001 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-beta001...HEAD [5.0.3-beta001]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta001 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience [Unreleased]: v5.0.3-alpha10...HEAD [5.0.3-alpha10]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-alpha10 ### Fixed - Issues with scaffolded code - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70
simon-reynolds
added a commit
that referenced
this pull request
Aug 9, 2021
## [5.0.3-beta005] - 2021-08-09 ### Fixed - Fix formatting of Nullable parameters - [@LiteracyFanatic](https://github.com/LiteracyFanatic) - #106 - Handle nullablility correctly in snapshot generation - #107 - Issues with scaffolded code - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 ### Added - Single case union support - [@lucasteles](https://github.com/lucasteles) - #98 - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience
simon-reynolds
added a commit
that referenced
this pull request
Aug 17, 2021
## [5.0.3-beta006] - 2021-08-17 ### Fixed - Removed `DevelopmentDependency=true` as it was setting `IncludeAssets` to undesirable values when restoring package - #108 - Fix formatting of Nullable parameters - [@LiteracyFanatic](https://github.com/LiteracyFanatic) - #106 - Handle nullablility correctly in snapshot generation - #107 - Issues with scaffolded code - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Issues with scaffolded code - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 [Unreleased]: v5.0.3-beta005...HEAD [5.0.3-beta005]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta005 ### Added - Single case union support - [@lucasteles](https://github.com/lucasteles) - #98 - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience - Single case union support - [@lucasteles](https://github.com/lucasteles) - #98 - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience
1 task
simon-reynolds
added a commit
that referenced
this pull request
Oct 16, 2021
## [5.0.3] - 2021-10-16 - Translations for `isNull` to be evaluated in-database - #114 ### Fixed - Removed `DevelopmentDependency=true` as it was setting `IncludeAssets` to undesirable values when restoring package - #108 - Fix formatting of Nullable parameters - [@LiteracyFanatic](https://github.com/LiteracyFanatic) - #106 - Handle nullablility correctly in snapshot generation - #107 - Issues with scaffolded code - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 - Issues with scaffolded code - Improved code generation for contexts scaffolded from an existing database - #89 - Correct issue with InsertData operations and 2D arrays - Generate valid code in HasData method - Fix issue with generated DbContext members in scaffolded code - Resolved issue with migrations have a missing unit arg to the Up method if no changes in model - Foreign Key constraints now created correctly - Fix indentation issue when table has constraints - #75 - Constraints now correctly generated - #72 - Generated Migrations will now always include the System namespace - #70 [Unreleased]: v5.0.3-beta005...HEAD [5.0.3-beta005]: https://github.com/efcore/EFCore.FSharp/releases/tag/v5.0.3-beta005 ### Added - Single case union support - [@lucasteles](https://github.com/lucasteles) - #98 - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience - Single case union support - [@lucasteles](https://github.com/lucasteles) - #98 - Query translation for Option types - [@lucasteles](https://github.com/lucasteles) - #93 - DbSet/IQueryable helpers to deal with EF Core async and nullable methods - [@lucasteles](https://github.com/lucasteles) - #94 - Automatic registration of DesignTimeServices - #86 - DbContextHelpers - curried functions for interacting with DbContext to allow for a more 'native' F# experience
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
EF Core gives a lot of Linq extensions like
FirstOrDefaultAsync
andToListAsync
.The problem with the
FirstOrDefault[Async]
is the fact that it could returnnull
instead of option which the idiomatic F# option.So with this PR I'm adding some functions and methods to help to deal with this common cases.
Types of changes
What types of changes does your code introduce to EFCore.FSharp?
Checklist