I have a problem with Entity Framework, it's truncating a string value while saving into database
I have database column Description nvarchar(max) in SQL Server 2014, and a property like this on my model class:
public string Description { get; set; }
I used this code to insert into database
db.EnitityName.Add(object);
db.SaveChanges();
Normally it works to save records, there is no problem, but when string exceeds more than 40k characters in Description property, it's saved value is truncated to the last characters from 40k to above.
E.g we have a 50k characters string, it saves only the first 40k characters and truncates the last 10k characters.
Is there something I did wrong, or does Entity Framework have a limitation on the string length, or database limitation in nvarchar(max)?
Please help me, I appreciate your valuable time in advance.
Thanks

select len(Description) from EnitityNameand check the size that way.