Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i-rzr-i/entitymaxlengthtrim
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.
https://github.com/i-rzr-i/entitymaxlengthtrim
database datatype db dto entity length maximum maxlength model parse split string trim truncate
Last synced: 3 days ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/i-rzr-i/entitymaxlengthtrim
- Owner: I-RzR-I
- License: mit
- Created: 2022-09-16T17:54:34.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-12T17:30:12.000Z (3 days ago)
- Last Synced: 2025-01-12T18:31:30.958Z (3 days ago)
- Topics: database, datatype, db, dto, entity, length, maximum, maxlength, model, parse, split, string, trim, truncate
- Language: C#
- Homepage:
- Size: 78.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
> **Note** This repository is developed for .netstandard1.5+ and net framework 4.5
[![NuGet Version](https://img.shields.io/nuget/v/EntityMaxLengthTrim.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/EntityMaxLengthTrim/)
[![Nuget Downloads](https://img.shields.io/nuget/dt/EntityMaxLengthTrim.svg?style=flat&logo=nuget)](https://www.nuget.org/packages/EntityMaxLengthTrim)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](docs/usage.md).
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](docs/usage.md)
1. [CHANGELOG](docs/CHANGELOG.md)
1. [BRANCH-GUIDE](docs/branch-guide.md)