PawelGerr / Thinktecture.EntityFrameworkCore

These libraries extend Entity Framework Core by a few features to make it easier to work with EF and for easier integration testing or to get more performance in some special cases.
https://dev.azure.com/pawelgerr/Thinktecture.EntityFrameworkCore
BSD 3-Clause "New" or "Revised" License
61 stars 17 forks source link

Set collations on columns if defined by the model. #20

Closed poizan42 closed 2 years ago

poizan42 commented 2 years ago

This makes SqlServerTempTableCreator respect the collation on columns if set explicitly by

buildAction.Property(e => e.Column).UseCollation("...")

Unfortunately the collation information isn't available from the runtime model so we need to fetch the design time model. I don't know if there could be problems with the design time model being unavailable or if it has negative performance implications (the generated SQL is cached, so seems unlikely). Alternatively another option could be added to SqlServerTempTableCreationOptions to tell it to respect the collation overrides.

NB: @PawelGerr Atm. your master branch here on GitHub isn't on par with the master branch on Azure DevOps, so your last two commits got included in the PR as well.

PawelGerr commented 2 years ago

Thx for the PR, I need a few days to investigate.