Beispiel #1
0
        /// <summary>
        /// Sets the collection items.
        /// </summary>
        /// <param name="items">The collection items or <c>null</c>.</param>
        public void Set(IEnumerable <TDocument> items)
        {
            if (items == null)
            {
                if (listWrapper != null)
                {
                    listWrapper.Detach();
                }

                property.Value = null;
                listWrapper    = null;
                return;
            }

            var jArray = new JArray();

            property.Value = jArray;
            listWrapper    = new DocListWrapper <TDocument>(parentEntity, context, jArray, items);
        }