If I have:
using System.ComponentModel.DataAnnotations.Schema;
namespace API.Entities
{
[Table("ProductOrders", Schema = "product_orders")]
public class ProductOrders
{
public int Id { get; set; }
public int? CategoryId { get; set; }
public Category? Category { get; set; }
}
}
How can I name the Category to whatever I like?
- Both the int and Category type
- Preferably using annotations
- E.g. rename Category to MainCategory
Second Question:
- Using the same table for multiple ones so I may have secondaryCategory referencing the same table