Check out example codes for "c# MaxLength vs stringlength attribute". It will help you in understanding the concepts better.
Code Example 1
MaxLength = Used by Entity Framework to define database field length. StringLength = Used to validate an input object's string property.
Learn ReactJs, React Native from akashmittal.com