GenerateModel
This will generate model classes for tables in your Schema. This is what setting up this Code Nanite looks like:
using System;
using System.Collections.Generic;
namespace MyProject.Models
{
public partial class Course: AuditableBaseEntity
{
public Course()
{
CourseAssignments = new HashSet<CourseAssignment>();
Enrollments = new HashSet<Enrollment>();
}
public int CourseID { get; set; }
public int Credits { get; set; }
public string Title { get; set; }
public int DepartmentID { get; set; }
public virtual Department Department { get; set; }
public virtual ICollection<CourseAssignment> CourseAssignments { get; set; }
public virtual ICollection<Enrollment> Enrollments { get; set; }
}
}
The highlighted code is what is generated and inserted by the CS_GENERATE_MODEL
code nanite. Also, it generates code for every table in your schema because in the label of the node ( See Code Tree), we used the [%CS_TABLE_LIST%]
Code Nanite.