1234567891011121314151617181920 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.DataAnnotations;
- using System.ComponentModel.DataAnnotations.Schema;
-
- namespace WebApiWebSem.DataAccess.Models
- {
- public partial class {{ table.getName() }}
- {
- {% for column in table.getColumns() %}{% if (column.isSelected()) %}
- public {{ column.getType() }}{% if (not (column.isNotNull()) and (column.isTypeNotNull())) %}?{% endif %} {{ column.getName() }} { get; set; }
- {% endif %}{% endfor %}
- {% for fk in table.getSourceForeignKeys() %}{% if (fk.isSelected()) %}
- public virtual {{ fk.getTargetTable().getName() }} {{ fk.getSourceForeignKeyName() }} { get; set; }
- {% endif %}{% endfor %}
- {% for fk in table.getTargetForeignKeys() %}{% if (fk.isSelected()) %}
- public virtual IList<{{ fk.getSourceTable().getName() }}> {{ fk.getTargetForeignKeyName() }} { get; set; }
- {% endif %}{% endfor %}
- }
- }
|