Allow `CoreTypeMapping.GenerateCodeLiteral` to influence `using` directives

Open
#13,799 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
databases

Research direction

Start by reviewing issue #13747 and the current literal-generation flow described here. Determine how generated literals can expose their arbitrary type usages before the file's using directives are finalized; the work is done when those required directives are added without relying on namespace-qualified literals.

Written by the indexing model from the issue text.

Description

area-migrations area-scaffolding providers-beware

See #13747

The expression tree for literals can contain use of arbitrary types and currently these need to be namespace-qualified because we can't ensure that the appropriate using directives are added to the file.

Note that this is non-trivial to fix, since currently we generate from the top down and don't know which literals we will be generating for.

Dominant language
C#
Stars
14.8k
Forks
3.4k
Avg merge
2d 5h
Merged PRs (30d)
134

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/efcore

All issues in dotnet/efcore

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.