mohan chichila
mohan chichila

Reputation: 1

I have one entity, i need to add property of entity type

**public class Ticket : BaseEntity
    {       
        public TicketType TicketType { get; set; } 
    }
public class TicketType : AuxiliaryInfoBaseEntity
    {     
        public string Description { get; set; }
    }**

In Ticket Entity i need one property of TicketType and type of column should be byte in Ticket. Resulting table will look like.Table-Ticket:column TicketType(tinyint,not null). When i trying to migrate, i am getting this exception. System.InvalidOperationException: 'The property 'Ticket.TicketType' is of type 'TicketType' which is not supported by current database provider. Either change the property CLR type or ignore the property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'. Please help me with some soluntion thanks.

Upvotes: 0

Views: 66

Answers (0)

Related Questions