Backender is an open source project in C# language that uses a config file to create the backend of your site in the repository pattern (yet!).
- Install from .NET Core Global Tool
dotnet tool install --global Backender.CLI
- Create or edit config file
- the command line executes the Backender command.
- Backender
- wait for prompt to enter the configuration file path (optional: Backender.yml file in the default program root directory)
- carriage return execution command
- wait for the end of the task execution.
- View output directory results
- Edit the created projects as you need.
- Enjoy the time saved!
SolutionName: GoBlog
SoltionNameSpace: GoBlog
Domains:
Entites:
- EntityName: Post
Cols:
- ColName: Title
ColType: string
Options: "-r"
- ColName: Author
ColType: string
Options: "-g"
- ColName: Content
ColType: string
- EntityName: Comment
Cols:
- ColName: Content
ColType: string
Options: "-r"
- ColName: Name
ColType: string
Options: "-r"
- ColName: CommentStatus
ColType: CommentStatus
Options: "-r"
- ColName: Email
ColType: string
- EntityName: Category
Cols:
- ColName: Title
ColType: string
Options: "-r"
- ColName: Description
ColType: string
Options: "-r"
RealationShips:
- Entity1: Post
Entity2: Comment
RealationShipType: O2M
- Entity1: Category
Entity2: Post
RealationShipType: O2M
Enums:
- EnumName: CommentStatus
EnumValues:
- Name: Pending
Value: 1
- Name: Accepted
Value: 2
- Name: Failed
Value: 3
-
The options field in the entity Cols can receive multiple options with spaces between them.
- -r means required, and gives it the required property
- -g means get, a method is defined in the repository that returns this object based on this field
-
The Realations can be
- O2O : ONE TO ONE
- O2M : ONE TO MANY
- M2M : MANY TO MANY