public virtual Note ToModel(Note note)
        {
            if (note == null)
            {
                throw new ArgumentNullException(nameof(note));
            }

            note.InjectFrom(this);
            return(note);
        }
Example #2
0
        public virtual Note ToNote(Note note)
        {
            if (note == null)
            {
                throw new ArgumentNullException("note");
            }

            note.InjectFrom(this);
            return(note);
        }
Example #3
0
        public static dataModel.Note ToDataModel(this coreModel.Note note)
        {
            if (note == null)
                throw new ArgumentNullException("note");

            var retVal = new dataModel.Note();
            retVal.InjectFrom(note);
            retVal.AuthorName = note.CreatedBy;
            retVal.ModifierName = note.ModifiedBy;
            return retVal;
        }
Example #4
0
        public static dataModel.Note ToDataModel(this coreModel.Note note)
        {
            if (note == null)
            {
                throw new ArgumentNullException("note");
            }

            var retVal = new dataModel.Note();

            retVal.InjectFrom(note);
            retVal.AuthorName   = note.CreatedBy;
            retVal.ModifierName = note.ModifiedBy;
            return(retVal);
        }
Example #5
0
        /// <summary>
        /// Patch
        /// </summary>
        /// <param name="source"></param>
        /// <param name="target"></param>
        public static void Patch(this dataModel.Note source, dataModel.Note target)
        {
            var patchInjectionPolicy = new PatchInjection <dataModel.Note>(x => x.Body, x => x.Title);

            target.InjectFrom(patchInjectionPolicy, source);
        }