Skip to content
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

Merging reference data does not work when using multibyte-charractors #194

Closed
karamem0 opened this issue Dec 15, 2022 · 1 comment
Closed

Comments

@karamem0
Copy link
Contributor

Hi,

I am using Beef with Entity Framework. I tried to initialize data into Reference data, but multibyte-charractors has been garbled.
I checked the logs and the INSERT query seems to be wrong.

INSERT INTO #temp ([Code], [Text], [CreatedDate], [CreatedBy], [UpdatedDate], [UpdatedBy], [IsActive], [SortOrder]) VALUES ('drafted', '下書き', ...)

The query does not use N prefix. The correct will be:

INSERT INTO #temp ([Code], [Text], [CreatedDate], [CreatedBy], [UpdatedDate], [UpdatedBy], [IsActive], [SortOrder]) VALUES (N'drafted', N'下書き', ...)
@chullybun
Copy link
Collaborator

Hi @karamem0,

Bit of a long story, but Beef is in the final stages of a major version release; see https://github.com/Avanade/Beef#version-5

The end result is Beef has had significant refactoring to pull out the various capabilities to make them more reusable and more awesome, etc.; see https://github.com/Avanade/Beef/tree/version-5#composition

Part of this refactoring has been an improvement around the Entity Framework support; especially in more complex scenarios where entities have relationships, etc. Also, for the most part a custom Mapping component has been introduced as an alternative to AutoMapper to simplify/improve this aspect given complexities/challenges with using.

I have copied the existing My.Hr sample; then created a new MyEf.Hr sample which is an end-to-end Entity Framework demonstration and is worth a walkthrough to see the changes.

Overall, the resulting code generation output is also improved. However, unfortunately, there will be reasonable effort required to upgrade/migrate existing. The code-generation YAML for the most is largely unchanged (beyond name change) and will provide warnings for any attributes no longer being used.

Your multibyte error I have resolved in this latest version; published packages are in preview being preview-5; for example: https://www.nuget.org/packages/Beef.CodeGen.Core/5.0.1-preview5. I will review and correct any outstanding issues with v4.x early in the New Year, but assume future focus is on v5.x going forward.

Thanks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants