Example #1
0
 public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
 {
     base.ToStream(binStream, auxObjects, eagerLoadLists);
     // it may be only an empty shell to stand-in for unreadable data
     if (!CurrentAccessRights.HasReadRights())
     {
         return;
     }
     binStream.Write(this._Birthday);
     binStream.Write(MubBlah_Nav != null ? MubBlah_Nav.ID : (int?)null);
     binStream.Write(MuhBlah_One_Nav != null ? MuhBlah_One_Nav.ID : (int?)null);
     binStream.Write(this._PersonName);
     binStream.Write(this.PhoneNumberMobile);
     binStream.Write(this.PhoneNumberOffice);
     binStream.WriteCollectionEntries(this._PhoneNumbersOtherCollection);
 }
Example #2
0
        // END Zetbox.DalProvider.Ef.Generator.Templates.Properties.IdProperty

        #region Serializer


        public override void ToStream(Zetbox.API.ZetboxStreamWriter binStream, HashSet <IStreamable> auxObjects, bool eagerLoadLists)
        {
            base.ToStream(binStream, auxObjects, eagerLoadLists);
            // it may be only an empty shell to stand-in for unreadable data
            if (!CurrentAccessRights.HasReadRights())
            {
                return;
            }
            binStream.Write(this._Birthday);
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Test.MuhblahEfImpl>("Model.FK_MB_Role_has_TCO_Lst_Role", "MB_Role").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
            {
                var key = this.RelationshipManager.GetRelatedReference <Zetbox.App.Test.MuhblahEfImpl>("Model.FK_MB_One_Role_loves_TCO_One_Role", "MB_One_Role").EntityKey;
                binStream.Write(key != null ? (int?)key.EntityKeyValues.Single().Value : (int?)null);
            }
            binStream.Write(this._PersonName);
            binStream.Write(this.PhoneNumberMobile);
            binStream.Write(this.PhoneNumberOffice);
            binStream.WriteCollectionEntries(this.PhoneNumbersOtherImpl);
        }