79389829

Date: 2025-01-27 05:53:42
Score: 1
Natty:
Report link

The comment from Mark G solved the issue. Original Link Thanks. Just pasting in here in case the link ever disappears.

Add the following to your dbcontext configuration

sqloptions.EnablePrimitiveCollectionsSupport(true);
sqloptions.TranslateParameterizedCollectionsToConstants();

e.g.

 services.AddDbContextPool<DatabaseUnitOfWork>(options => options
 .UseMySql(connectionstring, new MySqlServerVersion(new Version(8, 0, 21)),
 sqloptions =>
 {
     sqloptions.EnablePrimitiveCollectionsSupport(true);
     sqloptions.TranslateParameterizedCollectionsToConstants();
 });
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Tyrone