I have two classes: ThreadItem and request.
public class ThreadItem
{
[Key]
public int Id { get; set; }
public DateTime Created { get; set; }
}
public class ThreadItemMapping : EntityTypeConfiguration<ThreadItem>
{
public ThreadItemMapping()
{
Property(a => a.Id).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("ThreadItemId");
}
}
[Table("Enquiry")]
public class Enquiry : ThreadItem
{
public string Comment { get; set;}
}
Now it works, not just one problem. I have a table [ThreadItem] and a table [Request]. In my Query table, there is PK / FK that maps to ThreadItem, and this is what I need. However, I would like to rename the column.
This is currently [ThreadItemId], according to the ThreadItemMapping class. I would like to rename it [InquiryId]. I understand that it is called [ThreadItemId] makes sense, it is rather a question of "is it possible" to be honest.
Any ideas?
Cheers d
source
share