Entities

What is it about?

Entities are models that represent tables in the database/schema that can be updated over time through migrations.

Examples

Create Entity Class

frontier dotnet add entity [name-of-entity]

Generates NameOfEntity.cs

namespace NameOfProject.Domain.Entities { public class NameOfEntity { public int Id { get; set; } public string Property1 { get; set; } = String.Empty; public string Property2 { get; set; } = String.Empty; public string Property3 { get; set; } = String.Empty; } }

Description: This command generates a class entity based of the name used in the command. The file will be located at projectName/src/ProjectNameApi.Domain/NameOfEntity.cs. The file can then be modified to suit user's desired table.

Table of Contents