oracle / oracle/dotnet-db-samples
Unicode conversion default behaviour. Not changeable when using string interpolated queries.
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 434
- Forks
- 191
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 1
Description
It is not possible to change the default string conversion (nvarchar2) in an interpolated string.
e.g.
db.Model.FromSqlInterpolated("select ... from ... where key in (... field = {val} ...)")
What I already considered:
Note that field is not accessible in Model.
It would be really nice to globaly change the behaviour of using varchar2 instead of nvarchar2.
Something like:
builder.Services.AddDbContext<DataContext>(
options => options.UseOracle(builder.Configuration.GetConnectionString("DB"),
oraOptionsBuilder => oraOptionsBuilder.UserVarchar2()));
This would also allow to be a little more lazy on the column type definition with HasColumnType.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the FromSqlInterpolated example and review the linked Oracle EF Core performance considerations. The requested outcome is a global configuration option like UserVarchar2() that changes interpolated-query string conversion without requiring field access or repeated HasColumnType configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100