Open statler opened 4 years ago
Just about to jump on a plane. I'll look into this later.
Is this for EF6 or .Net Core ?
Take a look at case #179 which the solution is for using .HasMaxLength(null);
for images > 4000 bytes.
.IsMaxLength()
is used for ntext
column types.
@ErikEJ Have you ever heard of .HasMaxLength(null);
throwing an exception when trying to write any value to a table in which this property exists?
We need to know if this is for EF Core or EF 6.
EF 6 thanks Erik
BTW - this is exactly the issue listed by Listenreich in #179. Images >4000 bytes
Yes, but #179 is EF6, not Core.
OK, so now it is EF 6 after all??? 😕
This throws an exception when trying to write any value to a table in which this property exists.
@statler No, I have never heard about this, so please share the full stack trace of the exception, and your table schema.
Yes. Ef6. I had a typo and edited it almost immediately. Did you refer only to the email? Sorry about that.
Won't be able to get the stack trace quickly. Away from my PC on leave. But it is easy to replicate, just try to map an image greater than 4kb with the default code - e.g. HasMaxLength(null)
. You will get the error per #179
Well, in that case the generated code should most likely jsúst be changed to be:
.IsMaxLength();
Yes. Completely agree.
Thanks both. I'll update the code when I get back from holiday.
When generating the configuration for SqlCe image, the following is
This throws an exception when trying to write any value to a table in which this property exists.
The following however, does work.