开发者

DevExpress Problem with self reference association

开发者 https://www.devze.com 2023-02-10 00:37 出处:网络
I am using the DevExpress eXpressApp Framework to develop an LOB app for an insurance agency.My problem is in the area of the domain objects (business objects) and their associations, or relations.

I am using the DevExpress eXpressApp Framework to develop an LOB app for an insurance agency. My problem is in the area of the domain objects (business objects) and their associations, or relations.

I have a MyPerson object, primarily a PolicyHolder instance, and I need to associate a Spouse and Children of the same class to the PolicyHolder. When I tried the following code in the MyPersonn class, ran the code and tried to add a spouse, I got the error:

"There is a malformed association 'Person-Spouse'. Cannot find the associated member for 'PolicyMIS.Module.MyPerson.Spouse' in the class 'PolicyMIS.Module.MyPerson'"

开发者_开发百科    private MyPerson _spouse;
    [Association("Person-Spouse", typeof(MyPerson))]
    public MyPerson Spouse
    {
        get
        {
            return _spouse;
        }

        set
        {
            SetPropertyValue("Spouse", ref _spouse, value);
        }
    }


Please take a look at the results retuned by our search engine for your problem:

self-reference association

Does this help?

If not, we need more information about your task.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号