-
Notifications
You must be signed in to change notification settings - Fork 6k
Fix deprecated type provider example in F# query expressions documentation #48751
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
…losure Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot You need to fix the build errors.
samples/snippets/fsharp/query-expressions/query-expressions.fsproj
Outdated
Show resolved
Hide resolved
…rent project Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a few things to address here @copilot
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Tagging @T-Gro for review, even in draft status. Is the new sample idiomatic F#? It looks more like C# translated to F#, but in this area, they can be quite similar. |
Fix Type Provider Example in Query Expressions Documentation
The type provider example in F# query expressions documentation is using deprecated
FSharp.Data.TypeProviders
which is not compatible with modern .NET versions (net5.0+).Plan
Resolution Summary
✅ Issue Fixed: Successfully replaced deprecated
FSharp.Data.TypeProviders
with modern in-memory data approachLatest Changes (Code Review Fixes):
Documentation Format Updates:
09/26/2024
(corrected from previous date)[!code-fsharp[Main](...)]
to:::code language="fsharp" source="...":::
format as requested by @BillWagner:::
syntax for code blocksKey Changes Made:
Project Structure:
fssamples.fsproj
to use correct SDK (Microsoft.NET.Sdk
)/samples/snippets/fsharp/query-expressions/query-expressions.fsproj
FSharp.Data
package reference to parent projectCode Modernization:
Student
,Course
,CourseSelection
)AsQueryable()
extension for LINQ compatibilitysnippet1.fs
,snippet2.fs
Age
field with null safetyDocumentation Updates:
query-expressions.md
to use:::code language="fsharp" source="...":::
syntax for external snippets09/26/2024
db.Student
→studentsQueryable
,db.Course
→coursesQueryable
, etc.sortByNullable
for optional fieldswhere
clauses for null safety (student.Age.IsSome
)Testing & Validation:
Impact:
Original prompt
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.
Internal previews