/Backender

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!).

Primary LanguageC#Apache License 2.0Apache-2.0

# Backender

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!).

Demo

Backender

Getting Started

  1. Install from .NET Core Global Tool
  dotnet tool install --global Backender.CLI
  1. Create or edit config file
  2. 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
  3. wait for the end of the task execution.
  4. View output directory results
  5. Edit the created projects as you need.
  6. Enjoy the time saved!

Sample of config file in yaml

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
  1. 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
  2. The Realations can be

    • O2O : ONE TO ONE
    • O2M : ONE TO MANY
    • M2M : MANY TO MANY