I managed to solve the problem by setting the maximum length of the string in the model
public class Teacher { public int TeacherID { get; set; } [StringLength(255, MinimumLength = 3, ErrorMessage = "My Error Message")] public string Name { get; set: } [StringLength(255, MinimumLength = 3, ErrorMessage = "My Error Message")] public string Surname{ get; set; } }
Without StringLength, Orcale creates an NCLOB field that can hold up to 4 GB of data.
Note. The maximum length for varchar is 4000 bytes, so we cannot set more than 2000 as MaximumLenght (2 bytes per character with Unicode)
source share