[Column("Id", "StudentId")]
public int Id { get; set; }
[Column("UserId", "MainUser")]
public int UserId { get; set; }
[Join("Inquiry", "s.Id = i.StudentId AND s.UserId = i.UserId", JoinType.Inner, "i")]
public Inquiry Inquiry { get; set; }
[Join("Country", "s.CountryId = c.Id", JoinType.Left, "c")]
public Country Country { get; set; }
[Column("UserId", "InquiryUser")]
public int UserId { get; set; }
[Column("Name", "CountryName")]
public string Name { get; set; }
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public class TableAttribute : Attribute
public string TableName { get; }
public string Alias { get; }
public TableAttribute(string tableName, string alias = null)
[AttributeUsage(AttributeTargets.Property, Inherited = false)]
public class ColumnAttribute : Attribute
public string ColumnName { get; }
public string Alias { get; }
public ColumnAttribute(string columnName, string alias = null)
[AttributeUsage(AttributeTargets.Property, Inherited = false)]
public class JoinAttribute : Attribute
public string ForeignTable { get; }
public JoinType JoinType { get; }
public string Condition { get; }
public string Alias { get; }
public JoinAttribute(string foreignTable, string condition, JoinType joinType = JoinType.Inner, string alias = null)
ForeignTable = foreignTable;