Parsing Enum could be simplified

Open Beginner friendly
#4,278 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
65/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
csharp
Domain
documentation

Research direction

Open entity-framework/core/modeling/value-conversions.md and locate the Value Conversions example containing the EquineBeast parsing code. Replace the verbose Enum.Parse example with the generic form shown in the issue, then check the rendered documentation to confirm the example is correct.

Written by the indexing model from the issue text.

Description

area-change-tracking area-model-building

The code:

v => (EquineBeast)Enum.Parse(typeof(EquineBeast), v))

could be simplified:

v => Enum.Parse<EquineBeast>(v)

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

Dominant language
Mermaid
Stars
1.7k
Forks
2k
Avg merge
14h 54m
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/EntityFramework.Docs

All issues in dotnet/EntityFramework.Docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.