Current filter:
                                You should refresh the page.
                                0
                                  • Steps to Reproduce:

                                    [PersistentInterface]

                                        public interface MyInterface1 {

                                            String Name { get; set; }

                                        }

                                        [PersistentInterface]

                                        public interface MyInterface2 {

                                            String Name { get; set; }

                                            MyInterface1 Persistent { get; set; }

                                            [NonPersistent]

                                            MyInterface1 NonPersistent { get; set; }

                                        }

                                        [DomainLogic(typeof(MyInterface2))]

                                        public class MyInterface2Logic {

                                            public static MyInterface1 Get_NonPersistent(MyInterface2 instance) {

                                                return instance.Persistent;

                                            }

                                            public static void Set_NonPersistent(MyInterface2 instance, MyInterface1 value) {

                                                instance.Persistent = value;

                                            }

                                        }

                                            [Test]

                                            public void TestMy() {

                                                Builder.RegisterEntity("TestEntity1", typeof(MyInterface1));

                                                Builder.RegisterEntity("TestEntity2", typeof(MyInterface2));

                                                Builder.ForceBuild();

                                                XPClassInfo info1 = Builder.GetEntity("TestEntity1");

                                                XPClassInfo info2 = Builder.GetEntity("TestEntity2");

                                                using(UnitOfWork uow = new UnitOfWork(DataLayer)) {

                                                    MyInterface2 obj = info2.CreateNewObject(uow) as MyInterface2;

                                                    obj.NonPersistent = info1.CreateNewObject(uow) as MyInterface1;

                                                }

                                            }

                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.