public void Hydrate(CodeReplacement codeReplacement, CodeReplacementDTO codeReplacementDTO)
 {
     codeReplacement.EntityId        = codeReplacementDTO.EntityId;
     codeReplacement.Purpose         = codeReplacementDTO.Purpose;
     codeReplacement.CodeType        = codeReplacementDTO.CodeType;
     codeReplacement.Disabled        = codeReplacementDTO.Disabled;
     codeReplacement.FindCode        = codeReplacementDTO.FindCode;
     codeReplacement.ReplacementCode = codeReplacementDTO.ReplacementCode;
     codeReplacement.SortOrder       = codeReplacementDTO.SortOrder;
 }
        public CodeReplacementDTO Create(CodeReplacement codeReplacement)
        {
            if (codeReplacement == null)
            {
                return(null);
            }

            var codeReplacementDTO = new CodeReplacementDTO();

            codeReplacementDTO.CodeReplacementId = codeReplacement.CodeReplacementId;
            codeReplacementDTO.EntityId          = codeReplacement.EntityId;
            codeReplacementDTO.Purpose           = codeReplacement.Purpose;
            codeReplacementDTO.CodeType          = codeReplacement.CodeType;
            codeReplacementDTO.Disabled          = codeReplacement.Disabled;
            codeReplacementDTO.FindCode          = codeReplacement.FindCode;
            codeReplacementDTO.ReplacementCode   = codeReplacement.ReplacementCode;
            codeReplacementDTO.SortOrder         = codeReplacement.SortOrder;
            codeReplacementDTO.Entity            = Create(codeReplacement.Entity);

            return(codeReplacementDTO);
        }