内部自引用 - “给定属性'***'不是受支持的原始属性。” [英] Inner Self Reference - "The given property '***' is not a supported primitive property."

查看:79
本文介绍了内部自引用 - “给定属性'***'不是受支持的原始属性。”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用最新的CTP,并在尝试存储/检索具有相同类型属性的类型时收到错误。  例如,以下类型:

Im using the latest CTP and am getting an error when trying to store/retrieve a type with a property of the same type.  For example, the following type:

 

    公共类ExceptionInfo

    public class ExceptionInfo

     {

    {

         public int Id {get;组; }

        public int Id { get; set; }

         public string Message {get;组; }

        public string Message { get; set; }

         public string StackTrace {get;组; }

        public string StackTrace { get; set; }

         public ExceptionInfo InnerException {get;组; }

        public ExceptionInfo InnerException { get; set; }

    }

    }

 

我有以下配置:

 

             modelBuilder

            modelBuilder

   &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;   .Entity< ExceptionInfo>()

                .Entity<ExceptionInfo>()

   &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; .MapSingleType(误差=>新建

                .MapSingleType(error => new

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP; {

                                            {

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP,ID = error.Id,

                                                Id = error.Id,

&NBSP;&NBSP; &NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;消息=错误。消息,

                                                Message = error.Message,

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP ;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;堆栈跟踪= error.StackTrace,

                                                StackTrace = error.StackTrace,

&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;              &NBSP; &NBSP;   InnerError = error.InnerException

                                                InnerError = error.InnerException

   &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;  })

                                            })

   &NBSP; &NBSP; &NBSP; &NBSP; &NBSP; &NBSP;   .ToTable(" Errors");

                .ToTable("Errors");

 

我收到错误列在这篇文章的主题中。  我做错了什么?

I receive the error listed in the subject of this post.  What am I doing wrong?

 

推荐答案

bump

这篇关于内部自引用 - “给定属性'***'不是受支持的原始属性。”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆