Skip to content

One important thing about this repository, you have the possibility to avoid database exceptions related to exceeding the limit of the maximum allowed length of the string type columns. To specify the maximum allowed string length you can use data annotation attributes predefined in `System.ComponentModel.DataAnnotations` or a new custom attribute.

License

Notifications You must be signed in to change notification settings

I-RzR-I/EntityMaxLengthTrim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note This repository is developed for .netstandard1.5+ and net framework 4.5

NuGet Version Nuget Downloads

One important thing about this repository is that you can truncate input string in the fields/properties at the maximum allowed length from DB. To specify the maximum allowed string length you can use data annotation attributes predefined in System.ComponentModel.DataAnnotations or a new custom attribute.

The maximum allowed length will be searched in the attributes(you may use one of these):

  • MaxLengthAttribute -> ([MaxLength(x)]);
  • StringLengthAttribute -> ([StringLength(x)]);
  • MaxAllowedLengthAttribute -> ([MaxAllowedLength(x)]).

To get acquainted with a more detailed description, please check the content table at the first point.

Once you use this repository, you have the possibility to avoid database exceptions related to exceeding the limit of the maximum allowed length and the string type columns.

No additional components or packs are required for use. So, it only needs to be added/installed in the project and can be used instantly.

In case you wish to use it in your project, u can install the package from nuget.org or specify what version you want:

Install-Package EntityMaxLengthTrim -Version x.x.x.x

Content

  1. USING
  2. CHANGELOG
  3. BRANCH-GUIDE

About

One important thing about this repository, you have the possibility to avoid database exceptions related to exceeding the limit of the maximum allowed length of the string type columns. To specify the maximum allowed string length you can use data annotation attributes predefined in `System.ComponentModel.DataAnnotations` or a new custom attribute.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published