Skip to content
This repository was archived by the owner on Jun 23, 2019. It is now read-only.

Genbox/EFValidationTemplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

EF 5 Validation Template with DataAnnotations

An Entity Framework T4 template for auto-generating EF DataAnnotation validation code for entities based on metadata from the database.

Features

  • Puts [Required] on not null fields
  • Detects datetime, int and floating point numbers and inserts datatype range values
  • Guesses the kind of data and applies the appropriate regular expression for validation

Usage

Just drag and drop it into your Visual Studio project and change "MyModel.edmx" in the .tt file to match the name of your datamodel. It will create a metadata class which you should copy to another file, and then you can remove the .tt template.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published