Skip to content

khang-tuong/StarUml.CSharpEntityGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StarUml.CSharpEntityGenerator

Helps to generate .NET Core Entity files from StarUML ER Diagram.

The format of generated files is based on .NET EF Core

How to use

  1. Select the ER Diagram to be generated.
  2. Fill in the output directory path
  3. Entity files will be generated in the output path.

Functions

  1. Generate entities
  • Generate [StringLength] annotation if length is defined
  • Generate [Key] annotation if PK is defined
  • Generate [DatabaseGenerated(DatabaseGeneratedOption.Identity)] annotation if the primary key is type of Guid
  • Generate required keyword or nullable type if the field is defined as Not null or Nullable respectively
  • Generate properties based on defined columns
  1. Generate relationships
  • Generate one-to-many or one-to-one relationship based of EF Core convention

Notes

  • All columns which are deleted from view ONLY will be also generated. Please delete columns from model to have more accurate generated entities.
  • This extensions can't cover all conditions. It's just help to create entity files faster. Please review the generated files before applying to application.

What's new in version 2?

  • Add plural name converter
  • Use required keyword instead of [Required] annotation
  • Add application context file to define relationships
  • Remove "Entity" in entity name
  • Namespace can be customized