System.Data.SqlClient.SqlException: Invalid column name 'phone_types_phone_type_id'

前端 未结 7 597
野的像风
野的像风 2020-12-10 02:28

I\'m trying to get information from some of my models that have a foreign key relationships to my main employee model. If I map out each model individually, I can access the

相关标签:
7条回答
  • 2020-12-10 03:16

    I'm using nop commerce and to get around my problem I had to use ignore in my database map

    Ignore(p => p.CategoryAttachmentType);
    

    In the domain I had

    /// <summary>
        /// Gets or sets the category attachment type
        /// </summary>
        public CategoryAttachmentType CategoryAttachmentType
        {
            get
            {
                return (CategoryAttachmentType)this.CategoryAttachmentTypeId;
            }
            set
            {
                this.CategoryAttachmentTypeId = (int)value;
            }
        }
    
    0 讨论(0)
提交回复
热议问题