CINXE.COM

<!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><meta name="generator" content="Gatsby 4.24.4"/><meta data-react-helmet="true" name="theme-color" content="#fff"/><meta data-react-helmet="true" name="description" content="These are 5 rules for writing better DTOs."/><meta data-react-helmet="true" name="image" content="https://ardalis.com/static/91daa50bf1dfd2df7f2b1641e22251d2/6050d/5-Rules-DTOs.png"/><meta data-react-helmet="true" property="og:type" content="blog"/><meta data-react-helmet="true" property="og:image:alt" content="5 Rules for DTOs"/><meta data-react-helmet="true" property="og:locale" content="en_US"/><meta data-react-helmet="true" property="og:image" content="https://ardalis.com/static/91daa50bf1dfd2df7f2b1641e22251d2/6050d/5-Rules-DTOs.png"/><meta data-react-helmet="true" property="og:title" content="5 Rules for DTOs"/><meta data-react-helmet="true" property="og:description" content="These are 5 rules for writing better DTOs."/><meta data-react-helmet="true" property="og:url" content="https://ardalis.com/5-rules-dtos/"/><meta data-react-helmet="true" property="og:site_name" content="https://ardalis.com"/><meta data-react-helmet="true" property="article:author" content="Ardalis"/><meta data-react-helmet="true" name="twitter:title" content="5 Rules for DTOs"/><meta data-react-helmet="true" name="twitter:url" content="https://ardalis.com/5-rules-dtos/"/><meta data-react-helmet="true" name="twitter:description" content="These are 5 rules for writing better DTOs."/><meta data-react-helmet="true" name="twitter:card" content="summary_large_image"/><meta data-react-helmet="true" name="twitter:image" content="https://ardalis.com/static/91daa50bf1dfd2df7f2b1641e22251d2/6050d/5-Rules-DTOs.png"/><style data-href="/styles.eb8fec05cba5de708da7.css" data-identity="gatsby-global-css">@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400);pre[class*=language-].line-numbers{counter-reset:linenumber;padding-left:3.8em;position:relative}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{border-right:1px solid #999;font-size:100%;left:-3.8em;letter-spacing:-1px;pointer-events:none;position:absolute;top:0;-webkit-user-select:none;user-select:none;width:3em}.line-numbers-rows>span{counter-increment:linenumber;display:block}.line-numbers-rows>span:before{color:#999;content:counter(linenumber);display:block;padding-right:.8em;text-align:right}.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;text-align:right;-webkit-user-select:none;user-select:none}.command-line-prompt>span:before{content:" ";display:block;opacity:.7;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)}.command-line-prompt>span[data-continuation-prompt]:before{content:attr(data-continuation-prompt)}.command-line span.token.output{opacity:.7}code[class*=language-],pre[class*=language-]{word-wrap:normal;background:none;color:#f8f8f2;font-family:Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:1em;line-height:1.5;text-shadow:0 1px rgba(0,0,0,.3)}pre[class*=language-]{border-radius:.3em;padding:1em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.entity{cursor:help}.badgescard,.firstinfo{align-items:center;display:flex;justify-content:center}.container{background-color:#fff;z-index:10}.content-card{-webkit-animation:animatop .9s cubic-bezier(.425,1.14,.47,1.125) forwards;animation:animatop .9s cubic-bezier(.425,1.14,.47,1.125) forwards;position:relative}.card{border-radius:3px;box-shadow:0 10px 20px rgba(0,0,0,.2);font-size:18px;min-height:100px;overflow:hidden;padding:20px;width:700px}.card:after{-webkit-animation:rotatemagic .75s cubic-bezier(.425,1.04,.47,1.105) 1s both;animation:rotatemagic .75s cubic-bezier(.425,1.04,.47,1.105) 1s both;background:#3571b8;content:"";display:block;height:300px;position:absolute;width:190px}.card-sidebar{background-color:#fff;border-radius:3px;font-size:15px;left:0;margin-top:-4%;min-height:100px;overflow:hidden;padding:10px;position:relative;width:400px!important}.card-sidebar:after{-webkit-animation:rotatemagic .75s cubic-bezier(.425,1.04,.47,1.105) 1s both;animation:rotatemagic .75s cubic-bezier(.425,1.04,.47,1.105) 1s both;background:#3571b8;content:"";display:block;height:300px;position:absolute;width:190px}.tile.is-child{width:100%}.tile:not(.is-child){display:flex;width:100%}@media only screen and (max-width:1024px){.card{display:none}.card-sidebar,.recent-post{width:100%!important}.twitter-timeline{margin-left:2%!important;width:600px!important}.blog-list-item .featured-thumbnail{margin:0 0 1em;text-align:center;width:100%}.blog-list-item header{display:block;width:800px!important}}@media only screen and (max-width:480px){.card{display:none}.card-sidebar{background-color:#fff;border-radius:3px;font-size:12px;left:0;min-height:180px;overflow:hidden;padding:0;position:relative;width:340px!important}.card-sidebar:after{-webkit-animation:rotatemagic .75s cubic-bezier(.425,1.04,.47,1.105) 1s both;animation:rotatemagic .75s cubic-bezier(.425,1.04,.47,1.105) 1s both;background:#3571b8;content:"";display:block;height:240px;position:absolute;width:150px}.sidebar{left:50%!important;margin:0!important;visibility:collapse;width:380px!important}.tile:not(.is-child){display:block;width:100%}.recent-post{width:320px!important}.column{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;padding-bottom:0!important;padding-left:0!important;padding-right:0!important;padding-top:0}.MuiButton-root{margin-left:-5%!important;margin-top:5%!important}.MuiOutlinedInput-input{padding:14.5px 10px!important;width:280px!important}}@media only screen and (min-width:320px){.MuiOutlinedInput-input{padding:14.5px 10px!important;width:250px!important}}.sidebar{background-color:#fff;border-radius:6px;box-shadow:0 .5em 1em -.125em rgba(43,37,35,.1),0 0 0 1px rgba(43,37,35,.02);color:#4a4a4a;display:block;left:50%;padding-top:1.25rem;position:absolute;-webkit-transform:translate(-50%);transform:translate(-50%);z-index:0}.sidebar,ul li:before{font-weight:400;line-height:20px}.sidebar,h2,ul li:before{float:none;list-style:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpiYCATMKILmBbuMABSAUA84XS/xwdcGpmwiO0H4noQDTREgBSNMGCATzM2jYXEaGbEZhpQYQKQmo8kdAGIHZH9jNWpQAULgFQims3rifUjyBaSQhUWJaDQhfntA5rfccYjuiaQ/y4QE494NRHyI05NIMCCRcwRmuQWADU9YKA2AAgwANXjLnb5SuGCAAAAAElFTkSuQmCC);padding-right:.5em;position:relative;text-decoration:none}.sidebar,h2{font-weight:700;line-height:30px}.twitter-timeline{margin-left:2%!important}.firstinfo{flex-direction:row;padding:0;position:relative;z-index:2}.firstinfo img{border-radius:50%;height:120px;width:120px}.firstinfo .profileinfo{padding:0 10px 0 0}.firstinfo .profileinfo h1{font-size:1.8em}.firstinfo .profileinfo h3{color:#3571b8;font-size:1.2em;font-style:italic}.firstinfo .profileinfo p.bio{color:#5a5a5a;font-style:normal;line-height:1.2;padding:0}@-webkit-keyframes animatop{0%{bottom:-500px;opacity:0}to{bottom:0;opacity:1}}@keyframes animatop{0%{bottom:-500px;opacity:0}to{bottom:0;opacity:1}}@-webkit-keyframes animainfos{0%{bottom:10px}to{bottom:-42px}}@keyframes animainfos{0%{bottom:10px}to{bottom:-42px}}@-webkit-keyframes rotatemagic{0%{left:-253px;opacity:0;top:-24px;-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{left:-78px;top:-24px;-webkit-transform:rotate(-30deg);transform:rotate(-30deg)}}@keyframes rotatemagic{0%{left:-253px;opacity:0;top:-24px;-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{left:-78px;top:-24px;-webkit-transform:rotate(-30deg);transform:rotate(-30deg)}}.message-body{border-color:#5bc0de!important;border-radius:4px!important;border-style:solid;border-width:0 0 0 6px!important;font-size:1.7em}cite{color:#5bc0de!important}form input{border:2px;border-radius:6px;box-shadow:0 4px 1px rgba(0,0,0,.1);display:block;font-family:Merriweather,sans-serif;font-size:1.5em;margin-top:.5em;outline:0;padding:.7em;resize:none;width:60%}.form-control input:focus{background-color:#ffdae8}.section{padding:.8rem 1.5rem!important}.box{box-shadow:none!important}.navbar{font-size:1.2em;font-variant:unset;font-weight:600;min-height:5em}.recent-post{align-items:center;display:block;font-size:1em;margin-left:13px;width:340px}.recent-post,ul li:before{float:none;font-weight:400;left:3%;line-height:30px;list-style:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpiYCATMKILmBbuMABSAUA84XS/xwdcGpmwiO0H4noQDTREgBSNMGCATzM2jYXEaGbEZhpQYQKQmo8kdAGIHZH9jNWpQAULgFQims3rifUjyBaSQhUWJaDQhfntA5rfccYjuiaQ/y4QE494NRHyI05NIMCCRcwRmuQWADU9YKA2AAgwANXjLnb5SuGCAAAAAElFTkSuQmCC);padding-right:.5em;position:relative;text-decoration:none}@media print,screen and (min-width:769px){.column.is-12{flex:none;width:100%}}.subtitle{font-size:1rem!important;padding-top:4px}@media screen and (max-width:768px){.blog-list-item .featured-thumbnail{margin:0 0 1em;max-width:100%;text-align:center}.blog-list-item header{display:block;width:360px!important}}@media screen and (min-width:1024px){.navbar{min-height:4.25rem!important}}pre{font-family:Courier\ 10 Pitch,Courier,monospace;white-space:pre}code,pre{font-size:95%;line-height:140%;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-o-pre-wrap}code{background:#faf8f0;font-family:Monaco,Consolas,Andale Mono,DejaVu Sans Mono,monospace}#content code{border:1px solid #bebab0;display:block;padding:.5em 1em}body{margin:0;overflow:hidden;padding:0;width:100vw}.content .taglist{line-height:.5px!important;padding:2px!important}.MuiButton-root{height:55px!important;left:5%!important}.MuiOutlinedInput-input{width:300px!important}.MuiButton-containedPrimary{background-color:#3571b8!important;color:#fff}.form{left:55%!important;padding:10px!important}.content .catlist{align-items:center;display:block;flex-wrap:wrap;justify-content:left;list-style:none;margin:1.5rem 1.5rem 0 0;word-break:break-word!important}.gatsby-highlight-code-line{background-color:#feb;border-left:.25em solid #f99;display:block;margin-left:-1em;margin-right:-1em;padding-left:.75em;padding-right:1em}.gatsby-highlight pre[class*=language-].line-numbers{overflow:initial;padding:0 0 0 2.8em}.googletextbox{font-size:1em;padding:.1em}code[class*=language-],pre[class*=language-]{color:#9efeff;direction:ltr;font-family:Operator Mono,Fira Code,Consolas,Monaco,Andale Mono,Ubuntu Mono,monospace;font-size:17px;font-weight:400;-webkit-hyphens:none;hyphens:none;letter-spacing:.5px;line-height:25px;-o-tab-size:4;tab-size:4;text-align:left;text-shadow:0 1px #222245;white-space:pre;word-break:normal;word-spacing:normal}code[class*=language-] ::-moz-selection,code[class*=language-] ::selection,code[class*=language-]::-moz-selection,code[class*=language-]::selection,pre[class*=language-] ::-moz-selection,pre[class*=language-] ::selection,pre[class*=language-]::-moz-selection,pre[class*=language-]::selection{background:#a599e9;color:inherit}pre[class*=language-]{margin:.5em 0;overflow:auto;padding:2em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#1e1e3f}:not(pre)>code[class*=language-]{border-radius:.3em;padding:.1em}.token{font-weight:400}.token.cdata,.token.comment,.token.prolog{color:#b362ff}.token.atrule,.token.delimiter,.token.important,.token.keyword,.token.selector{color:#ff9d00}.token.attr-name,.token.operator{color:#ffb454}.token.punctuation{color:#fff}.token.boolean{color:#ff628c}.token.builtin,.token.doctype,.token.tag,.token.tag .punctuation{color:#ff9d00}.token.entity,.token.symbol{color:#6897bb}.token.constant,.token.number,.token.property,.token.variable{color:#ff628c}.token.char,.token.string{color:#a5ff90}.token.attr-value,.token.attr-value .punctuation{color:#a5c261}.token.attr-value .punctuation:first-child{color:#a9b7c6}.token.url{color:#287bde;text-decoration:underline}.token.function{color:#fad000}.token.regex{background:#364135}.token.bold{font-weight:700}.token.italic{font-style:italic}.token.inserted{background:#0f0}.token.deleted{background:#ff000d}code.language-css .token.property,code.language-css .token.property+.token.punctuation{color:#a9b7c6}code.language-css .token.id,code.language-css .token.selector>.token.attribute,code.language-css .token.selector>.token.class,code.language-css .token.selector>.token.pseudo-class,code.language-css .token.selector>.token.pseudo-element{color:#ffc66d}.token.class-name{color:#fb94ff}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{background:none}pre .line-highlight,pre .line-highlight.line-highlight,pre>code.line-highlight{background:linear-gradient(90deg,rgba(179,98,255,.17),transparent);margin-top:36px}pre .line-highlight:before,pre .line-highlight[data-end]:after,pre>code.line-highlight:before,pre>code.line-highlight[data-end]:after{content:""}pre code{padding-left:0}.navbar .navbar-menu{box-shadow:none!important}.content .taglist{align-items:center;display:flex;flex-wrap:wrap;justify-content:left;list-style:none;margin:1.5rem 1.5rem 0 0}.content .taglist li{margin-bottom:1.5rem;margin-top:0;padding:0 2rem 1rem 0}.full-width-image-container{left:50%;margin:2em -50vw;position:relative;right:50%}.full-width-image,.full-width-image-container{align-items:center;background-position:bottom;background-size:cover;display:flex;height:400px;justify-content:center;width:100vw}.btn{background-color:#fff;border-radius:.25rem;box-shadow:inset 0 0 0 2px #3571b8;color:#000;display:inline-block;font-size:18px;font-size:1rem;font-weight:700;line-height:1.25;padding:12px 16px 10px;text-align:center;text-decoration:none;transition:all .15s ease}.btn:hover{background-color:#3571b8;color:#fff}.margin-top-0{margin-top:0!important}.navbar-item .icon{color:#2b2523}.icon svg{fill:currentColor;height:1.5rem;width:1.5rem}.navbar-brand .navbar-item.logo{padding:0 1rem}footer.footer{background-color:transparent;padding:3rem 0 0}.social{padding:2em}.social a{background-color:#f5f5f5;border-radius:1em;display:inline;height:1em;margin:.5em;padding:.5em .5em .3em;vertical-align:middle;width:1em}.blog-list-item.is-featured{background-color:#2989d879}.blog-list-item header{display:flex;margin-bottom:1em}.blog-list-item .featured-thumbnail{flex-basis:100%;margin:0}/*! bulma.io v0.8.2 | MIT License | github.com/jgthms/bulma */@-webkit-keyframes spinAround{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.button{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}.box:not(:last-child),.content:not(:last-child),.message:not(:last-child),.notification:not(:last-child),.subtitle:not(:last-child),.title:not(:last-child){margin-bottom:1.5rem}.button,.input,.textarea{align-items:center;-moz-appearance:none;-webkit-appearance:none;border:1px solid transparent;border-radius:4px;box-shadow:none;display:inline-flex;font-size:1rem;height:2.5em;justify-content:flex-start;line-height:1.5;padding:calc(.5em - 1px) calc(.75em - 1px);position:relative;vertical-align:top}.button:active,.button:focus,.input:active,.input:focus,.is-active.button,.is-active.input,.is-active.textarea,.textarea:active,.textarea:focus{outline:none}/*! minireset.css v0.0.6 | MIT License | github.com/jgthms/minireset.css */body,h1,h2,h3,h4,html,li,p,textarea,ul{margin:0;padding:0}h1,h2,h3,h4{font-size:100%;font-weight:400}ul{list-style:none}button,input,textarea{margin:0}html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;background-color:#fff;font-size:16px;min-width:300px;overflow-x:hidden;overflow-y:scroll;text-rendering:optimizeLegibility}article,footer,header,section{display:block}body,button,input,textarea{font-family:BlinkMacSystemFont,-apple-system,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,Helvetica,Arial,sans-serif}code{-moz-osx-font-smoothing:auto;-webkit-font-smoothing:auto;font-family:monospace}body{color:#333;font-size:1em;font-weight:400;line-height:1.5}a{color:#3273dc;cursor:pointer}a strong{color:currentColor}a:hover{color:#363636}code{background-color:#f5f5f5;color:#f14668;font-size:.875em;font-weight:400;padding:.25em .5em}img{height:auto;max-width:100%}span{font-style:inherit;font-weight:inherit}strong{color:#363636;font-weight:700}.is-size-1{font-size:3rem!important}.is-size-2{font-size:2.5rem!important}.is-size-3{font-size:2rem!important}.is-size-4{font-size:1.5rem!important}.is-size-5{font-size:1.25rem!important}@media screen and (max-width:768px){.is-size-3-mobile{font-size:2rem!important}.is-size-5-mobile{font-size:1.25rem!important}}@media print,screen and (min-width:769px){.is-size-2-tablet{font-size:2.5rem!important}.is-size-5-tablet{font-size:1.25rem!important}}@media screen and (min-width:1216px){.is-size-1-widescreen{font-size:3rem!important}.is-size-4-widescreen{font-size:1.5rem!important}}.has-text-centered{text-align:center!important}.has-background-black{background-color:#2b2523!important}.has-text-primary{color:#2b2523!important}a.has-text-primary:focus,a.has-text-primary:hover{color:#0f0d0c!important}.has-text-white-ter{color:#f5f5f5!important}.has-text-weight-semibold{font-weight:600!important}.has-text-weight-bold{font-weight:700!important}.is-block{display:block!important}.box{background-color:#fff;border-radius:6px;box-shadow:0 .5em 1em -.125em rgba(43,37,35,.1),0 0 0 1px rgba(43,37,35,.02);color:#4a4a4a;display:block;padding:1.25rem}a.box:focus,a.box:hover{box-shadow:0 .5em 1em -.125em rgba(43,37,35,.1),0 0 0 1px #3273dc}a.box:active{box-shadow:inset 0 1px 2px rgba(43,37,35,.2),0 0 0 1px #3273dc}.button{background-color:#fff;border-color:#dbdbdb;border-width:1px;color:#363636;cursor:pointer;justify-content:center;padding:calc(.5em - 1px) 1em;text-align:center;white-space:nowrap}.button strong{color:inherit}.button .icon{height:1.5em;width:1.5em}.button .icon:first-child:not(:last-child){margin-left:calc(-.5em - 1px);margin-right:.25em}.button .icon:last-child:not(:first-child){margin-left:.25em;margin-right:calc(-.5em - 1px)}.button .icon:first-child:last-child{margin-left:calc(-.5em - 1px);margin-right:calc(-.5em - 1px)}.button:hover{border-color:#b5b5b5;color:#363636}.button:focus{border-color:#3273dc;color:#363636}.button:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-active,.button:active{border-color:#4a4a4a;color:#363636}.button.is-link{background-color:#3273dc;border-color:transparent;color:#fff}.button.is-link:hover{background-color:#276cda}.button.is-link:focus,.button.is-link:hover{border-color:transparent;color:#fff}.button.is-link:focus:not(:active){box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.button.is-link.is-active,.button.is-link:active{background-color:#2366d1;border-color:transparent;color:#fff}.container{flex-grow:1;margin:0 auto;position:relative;width:auto}@media screen and (min-width:1024px){.container{max-width:960px}}@media screen and (min-width:1216px){.container{max-width:1152px}}@media screen and (min-width:1408px){.container{max-width:1344px}}.content li+li{margin-top:.25em}.content p:not(:last-child),.content ul:not(:last-child){margin-bottom:1em}.content h1,.content h2,.content h3,.content h4{color:#363636;font-weight:600;line-height:1.125}.content h1{font-size:2em;margin-bottom:.5em}.content h1:not(:first-child){margin-top:1em}.content h2{font-size:1.75em;margin-bottom:.5714em}.content h2:not(:first-child){margin-top:1.1428em}.content h3{font-size:1.5em;margin-bottom:.6666em}.content h3:not(:first-child){margin-top:1.3333em}.content h4{font-size:1.25em;margin-bottom:.8em}.content ul{list-style:disc outside;margin-left:2em;margin-top:1em}.content ul ul{list-style-type:circle;margin-top:.5em}.content ul ul ul{list-style-type:square}.icon{align-items:center;display:inline-flex;height:1.5rem;justify-content:center;width:1.5rem}.image{display:block;position:relative}.image img{display:block;height:auto;width:100%}.notification{background-color:#f5f5f5;border-radius:4px;padding:1.25rem 2.5rem 1.25rem 1.5rem;position:relative}.notification a:not(.button):not(.dropdown-item){color:currentColor;text-decoration:underline}.notification strong{color:currentColor}.notification code{background:#fff}.notification .content,.notification .subtitle,.notification .title{color:currentColor}.notification.is-link{background-color:#3273dc;color:#fff}@-webkit-keyframes moveIndeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes moveIndeterminate{0%{background-position:200% 0}to{background-position:-200% 0}}.tags{align-items:center;display:flex;flex-wrap:wrap;justify-content:flex-start}.tags .tag{margin-bottom:.5rem}.tags .tag:not(:last-child){margin-right:.5rem}.tags:last-child{margin-bottom:-.5rem}.tags:not(:last-child){margin-bottom:1rem}.tag:not(body){align-items:center;background-color:#f5f5f5;border-radius:4px;color:#4a4a4a;display:inline-flex;font-size:.75rem;height:2em;justify-content:center;line-height:1.5;padding-left:.75em;padding-right:.75em;white-space:nowrap}.tag:not(body).is-link{background-color:#3273dc;color:#fff}.tag:not(body) .icon:first-child:not(:last-child){margin-left:-.375em;margin-right:.1875em}.tag:not(body) .icon:last-child:not(:first-child){margin-left:.1875em;margin-right:-.375em}.tag:not(body) .icon:first-child:last-child{margin-left:-.375em;margin-right:-.375em}a.tag:hover{text-decoration:underline}.subtitle,.title{word-break:break-word}.subtitle span,.title span{font-weight:inherit}.subtitle .tag,.title .tag{vertical-align:middle}.title{color:#363636;font-size:2rem;font-weight:600;line-height:1.125}.title strong{color:inherit;font-weight:inherit}.title:not(.is-spaced)+.subtitle{margin-top:-1.25rem}.title.is-4{font-size:1.5rem}.title.is-6{font-size:1rem}.title.is-7{font-size:.75rem}.subtitle{color:#4a4a4a;font-size:1.25rem;font-weight:400;line-height:1.25}.subtitle strong{color:#363636;font-weight:600}.subtitle:not(.is-spaced)+.title{margin-top:-1.25rem}.subtitle.is-4{font-size:1.5rem}.subtitle.is-6{font-size:1rem}.subtitle.is-7{font-size:.75rem}.heading{display:block;font-size:11px;letter-spacing:1px;margin-bottom:5px;text-transform:uppercase}.input,.textarea{background-color:#fff;border-color:#dbdbdb;border-radius:4px;color:#363636}.input::-moz-placeholder,.textarea::-moz-placeholder{color:rgba(54,54,54,.3)}.input::-webkit-input-placeholder,.textarea::-webkit-input-placeholder{color:rgba(54,54,54,.3)}.input:-moz-placeholder,.textarea:-moz-placeholder{color:rgba(54,54,54,.3)}.input:-ms-input-placeholder,.textarea:-ms-input-placeholder{color:rgba(54,54,54,.3)}.input:hover,.textarea:hover{border-color:#b5b5b5}.input:active,.input:focus,.is-active.input,.is-active.textarea,.textarea:active,.textarea:focus{border-color:#3273dc;box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.input,.textarea{box-shadow:inset 0 .0625em .125em rgba(43,37,35,.05);max-width:100%;width:100%}.is-link.input,.is-link.textarea{border-color:#3273dc}.is-link.input:active,.is-link.input:focus,.is-link.is-active.input,.is-link.is-active.textarea,.is-link.textarea:active,.is-link.textarea:focus{box-shadow:0 0 0 .125em rgba(50,115,220,.25)}.textarea{display:block;max-width:100%;min-width:100%;padding:calc(.75em - 1px);resize:vertical}.textarea:not([rows]){max-height:40em;min-height:8em}.label{color:#363636;display:block;font-size:1rem;font-weight:700}.label:not(:last-child){margin-bottom:.5em}.field:not(:last-child){margin-bottom:.75rem}.control{box-sizing:border-box;clear:both;font-size:1rem;text-align:left}.card,.control{position:relative}.card{background-color:#fff;box-shadow:0 .5em 1em -.125em rgba(43,37,35,.1),0 0 0 1px rgba(43,37,35,.02);color:#4a4a4a;max-width:100%}.menu,.message{font-size:1rem}.message{background-color:#f5f5f5;border-radius:4px}.message strong{color:currentColor}.message a:not(.button):not(.tag):not(.dropdown-item){color:currentColor;text-decoration:underline}.message.is-link{background-color:#eef3fc}.message.is-link .message-body{border-color:#3273dc;color:#2160c4}.message-body{border:solid #dbdbdb;border-radius:4px;border-width:0 0 0 4px;color:#4a4a4a;padding:1.25em 1.5em}.message-body code,.navbar{background-color:#fff}.navbar{min-height:3.25rem;position:relative;z-index:30}.navbar.is-link{background-color:#3273dc;color:#fff}.navbar.is-link .navbar-brand>.navbar-item{color:#fff}.navbar.is-link .navbar-brand>a.navbar-item.is-active,.navbar.is-link .navbar-brand>a.navbar-item:focus,.navbar.is-link .navbar-brand>a.navbar-item:hover{background-color:#2366d1;color:#fff}.navbar.is-link .navbar-burger{color:#fff}@media screen and (min-width:1024px){.navbar.is-link .navbar-end>.navbar-item,.navbar.is-link .navbar-start>.navbar-item{color:#fff}.navbar.is-link .navbar-end>a.navbar-item.is-active,.navbar.is-link .navbar-end>a.navbar-item:focus,.navbar.is-link .navbar-end>a.navbar-item:hover,.navbar.is-link .navbar-start>a.navbar-item.is-active,.navbar.is-link .navbar-start>a.navbar-item:focus,.navbar.is-link .navbar-start>a.navbar-item:hover{background-color:#2366d1;color:#fff}}.navbar>.container{width:100%}.navbar-brand,.navbar>.container{align-items:stretch;display:flex;min-height:3.25rem}.navbar-brand{flex-shrink:0}.navbar-brand a.navbar-item:focus,.navbar-brand a.navbar-item:hover{background-color:transparent}.navbar-burger{color:#4a4a4a;cursor:pointer;display:block;height:3.25rem;margin-left:auto;position:relative;width:3.25rem}.navbar-burger span{background-color:currentColor;display:block;height:1px;left:calc(50% - 8px);position:absolute;-webkit-transform-origin:center;transform-origin:center;transition-duration:86ms;transition-property:background-color,opacity,-webkit-transform;transition-property:background-color,opacity,transform;transition-property:background-color,opacity,transform,-webkit-transform;transition-timing-function:ease-out;width:16px}.navbar-burger span:first-child{top:calc(50% - 6px)}.navbar-burger span:nth-child(2){top:calc(50% - 1px)}.navbar-burger span:nth-child(3){top:calc(50% + 4px)}.navbar-burger:hover{background-color:rgba(0,0,0,.05)}.navbar-burger.is-active span:first-child{-webkit-transform:translateY(5px) rotate(45deg);transform:translateY(5px) rotate(45deg)}.navbar-burger.is-active span:nth-child(2){opacity:0}.navbar-burger.is-active span:nth-child(3){-webkit-transform:translateY(-5px) rotate(-45deg);transform:translateY(-5px) rotate(-45deg)}.navbar-menu{display:none}.navbar-item{color:#4a4a4a;display:block;line-height:1.5;padding:.5rem .75rem;position:relative}.navbar-item .icon:only-child{margin-left:-.25rem;margin-right:-.25rem}a.navbar-item{cursor:pointer}a.navbar-item.is-active,a.navbar-item:focus,a.navbar-item:focus-within,a.navbar-item:hover{background-color:#fafafa;color:#3273dc}.navbar-item{flex-grow:0;flex-shrink:0}.navbar-item img{max-height:1.75rem}@media screen and (max-width:1023px){.navbar>.container{display:block}.navbar-brand .navbar-item{align-items:center;display:flex}.navbar-menu{background-color:#fff;box-shadow:0 8px 16px rgba(43,37,35,.1);padding:.5rem 0}.navbar-menu.is-active{display:block}}@media screen and (min-width:1024px){.navbar,.navbar-end,.navbar-menu,.navbar-start{align-items:stretch;display:flex}.navbar{min-height:3.25rem}.navbar.is-transparent a.navbar-item.is-active,.navbar.is-transparent a.navbar-item:focus,.navbar.is-transparent a.navbar-item:hover{background-color:transparent!important}.navbar-burger{display:none}.navbar-item{align-items:center;display:flex}.navbar-menu{flex-grow:1;flex-shrink:0}.navbar-start{justify-content:flex-start;margin-right:auto}.navbar-end{justify-content:flex-end;margin-left:auto}.container>.navbar .navbar-brand,.navbar>.container .navbar-brand{margin-left:-.75rem}.container>.navbar .navbar-menu,.navbar>.container .navbar-menu{margin-right:-.75rem}a.navbar-item.is-active{color:#2b2523}a.navbar-item.is-active:not(:focus):not(:hover){background-color:transparent}}.column{display:block;flex-basis:0;flex-grow:1;flex-shrink:1;padding:.75rem}@media print,screen and (min-width:769px){.column.is-offset-1{margin-left:8.33333%}.column.is-4{flex:none;width:33.33333%}.column.is-6{flex:none;width:50%}.column.is-7{flex:none;width:58.33333%}.column.is-10{flex:none;width:83.33333%}.column.is-12{flex:none;width:100%}}.columns{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.columns:last-child{margin-bottom:-.75rem}.columns:not(:last-child){margin-bottom:.75rem}.columns.is-multiline{flex-wrap:wrap}@media print,screen and (min-width:769px){.columns:not(.is-desktop){display:flex}}.tile{align-items:stretch;display:block;flex-basis:0;flex-grow:1;flex-shrink:1;min-height:-webkit-min-content;min-height:min-content}.tile.is-ancestor{margin-left:-.75rem;margin-right:-.75rem;margin-top:-.75rem}.tile.is-ancestor:last-child{margin-bottom:-.75rem}.tile.is-ancestor:not(:last-child){margin-bottom:.75rem}.tile.is-child{margin:0!important}.tile.is-parent{padding:.75rem}.tile.is-vertical{flex-direction:column}.tile.is-vertical>.tile.is-child:not(:last-child){margin-bottom:1.5rem!important}@media print,screen and (min-width:769px){.tile:not(.is-child){display:flex}.tile.is-4{flex:none;width:33.33333%}.tile.is-6{flex:none;width:50%}.tile.is-7{flex:none;width:58.33333%}.tile.is-10{flex:none;width:83.33333%}.tile.is-12{flex:none;width:100%}}.section{padding:3rem 1.5rem}.footer{background-color:#fafafa;padding:3rem 1.5rem 6rem}@media screen and (min-width:769px) and (max-width:1023px){.blog-list-item .featured-thumbnail{flex-basis:50%}}@media screen and (max-width:768px){.blog-list-item header{display:block}.blog-list-item .featured-thumbnail{margin:0 0 1em;max-width:70%;text-align:center}}a{text-decoration:none}</style><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl+'';f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer', 'GTM-NVBMVX8');</script><title data-react-helmet="true">5 Rules for DTOs | Blog</title><link data-react-helmet="true" rel="alternate" type="application/rss+xml" title="RSS Feed for Ardalis" href="/rss.xml/"/><link data-react-helmet="true" rel="apple-touch-icon" sizes="180x180" href="/img/apple-touch-icon.png"/><link data-react-helmet="true" rel="icon" type="image/png" href="/img/favicon-32x32.png" sizes="32x32"/><link data-react-helmet="true" rel="icon" type="image/png" href="/img/favicon-16x16.png" sizes="16x16"/><link data-react-helmet="true" rel="mask-icon" href="/img/safari-pinned-tab.svg" color="#ff4400"/><link rel="sitemap" type="application/xml" href="/sitemap/sitemap-index.xml"/><style id="jss-server-side"></style></head><body><noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NVBMVX8" height="0" width="0" style="display: none; visibility: hidden" aria-hidden="true"></iframe></noscript><div id="___gatsby"><div style="outline:none" tabindex="-1" id="gatsby-focus-wrapper"><div><nav class="navbar is-transparent" role="navigation" aria-label="main-navigation"><div class="container"><div class="navbar-brand"><a class="navbar-item" title="Logo" href="/"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAA8CAYAAADc3IdaAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AUaFDE304pirgAAFAJJREFUeNrtnWuUFNW1x/+8RBQRb0TUCCKaiIrgMFXVNeioGDVqjBFRQ2JMYu7FBwJdp7pnesY7gBo16sVHjBo0PtY1JgZ0KcShq6p73g+J4AMf+MAkeNVEE18gIjjAOvdD74Geoaf7nO6q7p6e+rDX4gN9XlX1m3P22fu/wTlHvkydFz1AYfYNqhm/UzHsJZlMZfYdGost0eY5E/I5Tt+yNwCHA7hS0L7rr5lvUu9XPjtTDGvByQvXcr22k+s17QLWwU9e/BJXmbXUf1j9BlhnA+CC1jyA1+lIAHcD+A2Ae9LYfQDOk2h3OICfAfgDgLUAXgLQDuAuAKf6wBK0sjkrRyhG9I1AdQtXmS1sWriRq2bsU8WoP8oHQr/4EGdIAGvFAF6n6RLrdLtgm98G0JamnR0Ern19YGWwcub8Qo+0c9V0pIClMpvrtR283Ije5gPBB1YJrZMG4GvBdbpBoL1DALwp2N4SH1hpd1dLhyrMekmPtEnDSmU2D4SbuGpY/9bmN3/Th4IPLB9YKdu7U2LddwII+MDqa3dlWhcHqluy2l11W0VNB1eYvdCHgg8sH1gp/VYbJNZd+Jg54IA1cxkfrDC7VY+0Zw0rldk8UNXMFcN+7+T50YN9MPjA8oHVo60TAGySBNbTPrBS3QwGnXO0cCPXzFhOwFKZzfWaTq4xO+iDwQeWD6webU0FsFkS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3VyY2UA9f+D6wAAAAZ0RVh0VGl0bGUAqO7SJwAAAAh0RVh0V2FybmluZwDAG+aHAAAAAElFTkSuQmCC" alt="Ardalis" style="width:150px"/></a><div class="navbar-burger burger " data-target="navMenu" role="button" tabindex="0"><span></span><span></span><span></span></div></div><div id="navMenu" class="navbar-menu "><div class="navbar-start has-text-centered"><a class="navbar-item" href="/blog">Blog</a><a class="navbar-item" href="/training-classes">Training</a><a class="navbar-item" href="/mentoring">Mentoring</a><a class="navbar-item" href="/tips">Subscribe</a><a class="navbar-item" href="/interviews">Interviews</a><a class="navbar-item" href="/books">Books</a><a class="navbar-item" href="/tools-used">Tools Used</a><a class="navbar-item" href="/contact-us">Contact</a></div><div class="navbar-end has-text-centered"><a class="navbar-item" href="https://www.facebook.com/StevenAndrewSmith" target="_blank" rel="noopener noreferrer"><span class="icon"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+RmFjZWJvb2sgaWNvbjwvdGl0bGU+PHBhdGggZD0iTTIyLjY3NiAwSDEuMzI0Qy41OTMgMCAwIC41OTMgMCAxLjMyNHYyMS4zNTJDMCAyMy40MDguNTkzIDI0IDEuMzI0IDI0aDExLjQ5NHYtOS4yOTRIOS42ODl2LTMuNjIxaDMuMTI5VjguNDFjMC0zLjA5OSAxLjg5NC00Ljc4NSA0LjY1OS00Ljc4NSAxLjMyNSAwIDIuNDY0LjA5NyAyLjc5Ni4xNDF2My4yNGgtMS45MjFjLTEuNSAwLTEuNzkyLjcyMS0xLjc5MiAxLjc3MXYyLjMxMWgzLjU4NGwtLjQ2NSAzLjYzSDE2LjU2VjI0aDYuMTE1Yy43MzMgMCAxLjMyNS0uNTkyIDEuMzI1LTEuMzI0VjEuMzI0QzI0IC41OTMgMjMuNDA4IDAgMjIuNjc2IDAiLz48L3N2Zz4=" alt="facebook"/></span></a><a class="navbar-item" href="https://www.linkedin.com/in/stevenandrewsmith" target="_blank" rel="noopener noreferrer"><span class="icon"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+TGlua2VkSW4gaWNvbjwvdGl0bGU+PHBhdGggZD0iTTIwLjQ0NyAyMC40NTJoLTMuNTU0di01LjU2OWMwLTEuMzI4LS4wMjctMy4wMzctMS44NTItMy4wMzctMS44NTMgMC0yLjEzNiAxLjQ0NS0yLjEzNiAyLjkzOXY1LjY2N0g5LjM1MVY5aDMuNDE0djEuNTYxaC4wNDZjLjQ3Ny0uOSAxLjYzNy0xLjg1IDMuMzctMS44NSAzLjYwMSAwIDQuMjY3IDIuMzcgNC4yNjcgNS40NTV2Ni4yODZ6TTUuMzM3IDcuNDMzYy0xLjE0NCAwLTIuMDYzLS45MjYtMi4wNjMtMi4wNjUgMC0xLjEzOC45Mi0yLjA2MyAyLjA2My0yLjA2MyAxLjE0IDAgMi4wNjQuOTI1IDIuMDY0IDIuMDYzIDAgMS4xMzktLjkyNSAyLjA2NS0yLjA2NCAyLjA2NXptMS43ODIgMTMuMDE5SDMuNTU1VjloMy41NjR2MTEuNDUyek0yMi4yMjUgMEgxLjc3MUMuNzkyIDAgMCAuNzc0IDAgMS43Mjl2MjAuNTQyQzAgMjMuMjI3Ljc5MiAyNCAxLjc3MSAyNGgyMC40NTFDMjMuMiAyNCAyNCAyMy4yMjcgMjQgMjIuMjcxVjEuNzI5QzI0IC43NzQgMjMuMiAwIDIyLjIyMiAwaC4wMDN6Ii8+PC9zdmc+" alt="linkedin"/></span></a><a class="navbar-item" href="https://twitter.com/ardalis" target="_blank" rel="noopener noreferrer"><span class="icon"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+VHdpdHRlciBpY29uPC90aXRsZT48cGF0aCBkPSJNMjMuOTU0IDQuNTY5Yy0uODg1LjM4OS0xLjgzLjY1NC0yLjgyNS43NzUgMS4wMTQtLjYxMSAxLjc5NC0xLjU3NCAyLjE2My0yLjcyMy0uOTUxLjU1NS0yLjAwNS45NTktMy4xMjcgMS4xODQtLjg5Ni0uOTU5LTIuMTczLTEuNTU5LTMuNTkxLTEuNTU5LTIuNzE3IDAtNC45MiAyLjIwMy00LjkyIDQuOTE3IDAgLjM5LjA0NS43NjUuMTI3IDEuMTI0QzcuNjkxIDguMDk0IDQuMDY2IDYuMTMgMS42NCAzLjE2MWMtLjQyNy43MjItLjY2NiAxLjU2MS0uNjY2IDIuNDc1IDAgMS43MS44NyAzLjIxMyAyLjE4OCA0LjA5Ni0uODA3LS4wMjYtMS41NjYtLjI0OC0yLjIyOC0uNjE2di4wNjFjMCAyLjM4NSAxLjY5MyA0LjM3NCAzLjk0NiA0LjgyNy0uNDEzLjExMS0uODQ5LjE3MS0xLjI5Ni4xNzEtLjMxNCAwLS42MTUtLjAzLS45MTYtLjA4Ni42MzEgMS45NTMgMi40NDUgMy4zNzcgNC42MDQgMy40MTctMS42OCAxLjMxOS0zLjgwOSAyLjEwNS02LjEwMiAyLjEwNS0uMzkgMC0uNzc5LS4wMjMtMS4xNy0uMDY3IDIuMTg5IDEuMzk0IDQuNzY4IDIuMjA5IDcuNTU3IDIuMjA5IDkuMDU0IDAgMTMuOTk5LTcuNDk2IDEzLjk5OS0xMy45ODYgMC0uMjA5IDAtLjQyLS4wMTUtLjYzLjk2MS0uNjg5IDEuOC0xLjU2IDIuNDYtMi41NDhsLS4wNDctLjAyeiIvPjwvc3ZnPg==" alt="twitter"/></span></a><a class="navbar-item" href="https://www.youtube.com/ardalis/" target="_blank" rel="noopener noreferrer"><span class="icon"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI0IDI0Ij48dGl0bGU+WW91VHViZSBpY29uPC90aXRsZT48cGF0aCBkPSJNMjMuNDk1IDYuMjA1YTMuMDA3IDMuMDA3IDAgMCAwLTIuMDg4LTIuMDg4Yy0xLjg3LS41MDEtOS4zOTYtLjUwMS05LjM5Ni0uNTAxcy03LjUwNy0uMDEtOS4zOTYuNTAxQTMuMDA3IDMuMDA3IDAgMCAwIC41MjcgNi4yMDVhMzEuMjQ3IDMxLjI0NyAwIDAgMC0uNTIyIDUuODA1IDMxLjI0NyAzMS4yNDcgMCAwIDAgLjUyMiA1Ljc4MyAzLjAwNyAzLjAwNyAwIDAgMCAyLjA4OCAyLjA4OGMxLjg2OC41MDIgOS4zOTYuNTAyIDkuMzk2LjUwMnM3LjUwNiAwIDkuMzk2LS41MDJhMy4wMDcgMy4wMDcgMCAwIDAgMi4wODgtMi4wODggMzEuMjQ3IDMxLjI0NyAwIDAgMCAuNS01Ljc4MyAzMS4yNDcgMzEuMjQ3IDAgMCAwLS41LTUuODA1ek05LjYwOSAxNS42MDFWOC40MDhsNi4yNjQgMy42MDJ6Ii8+PC9zdmc+" alt="youtube"/></span></a><a class="navbar-item" href="https://github.com/ardalis" target="_blank" rel="noopener noreferrer"><span class="icon"><img src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBpZD0iQ2FwYV8xIiB3aWR0aD0iNDM4LjU0OSIgaGVpZ2h0PSI0MzguNTQ5IiB4PSIwIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA0MzguNTQ5IDQzOC41NDkiIHk9IjAiIHZlcnNpb249IjEuMSIgdmlld0JveD0iMCAwIDQzOC41NDkgNDM4LjU0OSIgeG1sOnNwYWNlPSJwcmVz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"><div class="full-width-image-container margin-top-0" style="background-image:url(/static/blogging-ea4fdaec566aafddd0291352e3f8802d.jpg)"></div><div class="tile is-ancestor"><div class="tile is-vertical is-7"><div class="tile"><div class="tile is-parent"><article class="tile is-child box"><div class="container content"><div class="columns"><div class="column is-10 is-offset-1"><h1 class="title is-size-2 has-text-weight-bold is-bold-light">5 Rules for DTOs</h1><p style="width:100%;font-weight:bold;color:#3571B8"> Date Published: <!-- -->06 April 2024</p><p><img src="/static/91daa50bf1dfd2df7f2b1641e22251d2/6050d/5-Rules-DTOs.png" alt="5 Rules for DTOs" width="100%"/></p><div><p>If you don't like reading, here's my YouTube video with samples that covers why these 5 rules will help you write better DTOs:</p> <iframe width="560" height="315" src="https://www.youtube.com/embed/W4n9x_qGpT4?si=1ryxzqqMlRM3Sx8w" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> <h2>What's a DTO?</h2> <p>A DTO is a Data Transfer Object. Its job is to transfer data, and it can be used both to <em>send</em> data and to <em>receive</em> it. Often, data transferred will use different types (possibly even different programming languages and technology stacks) on each end of the transfer. The only thing you can count on transferring is the <em>data</em> - nothing else. Which leads to the first rule for DTOs.</p> <p><img src="/img/DTOs-Rule-1.png" alt="Rule 1. DTOs only contain data. No logic or behavior."></p> <p>DTOs should be super easy to work with, as well as to author. They do not benefit from encapsulation and typically they should avoid using inheritance as well (hiding things isn't something we want with DTOs, and reuse is overrated, too). Which leads us to the second rule.</p> <p><img src="/img/DTOs-Rule-2.png" alt="Rule 2. DTOs do not enforce encapsulation. They don&#x27;t need private/protected members."></p> <p>Now, even though DTOs don't need encapsulation, it's still generally preferred to use C# properties rather than fields. By default, serializers and other language features work on properties but not fields (though you can configure this). Rule 3:</p> <p><img src="/img/DTOs-Rule-3.png" alt="Rule 3. DTOs should use properties (not fields)."></p> <p>But what should you name them? An obvious naming convention is simply to add "DTO" (or "Dto") to the end of whatever sort of thing is being described. While this works and is fine for the most basic representation, there are many cases where you should use a more descriptive name.</p> <p>Many common types used in modern dotnet apps can (and usually should) be modeled as DTOs. These include API request and response objects, commands and queries, events, and more. In such cases, suffix the type with the more specific name (e.g. "CreateUserRequest" instead of just "UserDTO"). See rule 4.</p> <p><img src="/img/DTOs-Rule-4.png" alt="Rule 4. DTOs should only use &#x22;-DTO&#x22; suffix as a last resort. Prefer more descriptive names."></p> <p>Here are some of the things that should be DTOs, and should be named according to their particular use, rather than naming them "FooDTO", as rule 5:</p> <p><img src="/img/DTOs-Rule-5.png" alt="Rule 5. These should be modeled as DTOs: API Request/Response types, MVC ViewModel objects, Database query result objects, Messages like commands, events, and queries."></p> <h2>Summary</h2> <p>There's actually quite a bit more to say about DTOs, like how to map them, where they should live, and what types they should reference, but I'll save that for a follow-up article/video.</p> <p><a href="https://www.youtube.com/watch?v=W4n9x_qGpT4&#x26;ab_channel=Ardalis">Watch the full video on YouTube with samples here</a>. Thanks!</p> <h2>Keep Up With Me</h2> <p>If you're looking for more content from me in your inbox <a href="/tips">subscribe to my weekly tips newsletter</a> and be sure to follow me on <a href="https://www.youtube.com/ardalis?sub_confirmation=1">YouTube</a>.</p></div><span><div style="margin-top:2rem"><h4>Tags - <a style="font-size:1rem;color:gray" href="/tags/">Browse all tags</a></h4><ul class="taglist"><li><a href="/tags/net/">.NET</a></li><li><a href="/tags/c-sharp/">CSharp</a></li><li><a href="/tags/dotnet/">dotnet</a></li><li><a href="/tags/web-ap-is/">Web APIs</a></li><li><a href="/tags/messages/">Messages</a></li><li><a href="/tags/events/">Events</a></li><li><a href="/tags/commands/">Commands</a></li><li><a href="/tags/queries/">Queries</a></li><li><a href="/tags/cqrs/">CQRS</a></li></ul></div></span><span><div style="margin-top:1rem"><h4>Category - <a style="font-size:1rem;color:gray" href="/category/">Browse all categories</a></h4><ul class="taglist"><li><a href="/category/software-development/">Software Development</a></li></ul></div></span><div class="content has-text-centered"><div class="content-card"><div class="card"><div class="firstinfo"><img src="/static/steve-smith-ardalis-200x200-e9fab63b806b33a2ee3ded4a954bbdfa.jpg" alt="Steve Smith"/><div class="profileinfo"><h1>About Ardalis</h1><h3>Software Architect</h3><p class="bio">Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.</p></div></div></div></div></div><div><div id="disqus_thread"></div></div></div></div></div></article></div></div></div><div><header><div><div class="tile is-parent"><article class="tile is-child box"><div class="sidebar" id="sidebar"><div class="content has-text-centered"><div class="content-card"><div class="card-sidebar"><div class="firstinfo"><img src="/static/steve-smith-ardalis-200x200-e9fab63b806b33a2ee3ded4a954bbdfa.jpg" alt="Steve Smith"/><div class="profileinfo"><h1>About Ardalis</h1><h3>Software Architect</h3><p class="bio">Steve is an experienced software architect and trainer, focusing on code quality and Domain-Driven Design with .NET.</p></div></div></div></div></div><div style="padding:8px;margin-left:10px">Get a <a href="/tips">Free Developer Tip</a> in your inbox every Wednesday.</div><div><a href="/search"><h2 style="font-size:22px;padding:7px;margin-left:15px;font-weight:BOLD"><span role="img" aria-label="magnifying glass">🔍</span> SEARCH</h2></a></div> <br/><div><h2 style="font-size:22px;padding:7px;margin-left:15px;font-weight:BOLD"><span role="img" aria-label="graduation cap">🎓</span> ONLINE TRAINING</h2></div> <br/><div class="recent-post"><ul class="recent-post"><li><a href="https://dometrain.com/bundle/from-zero-to-hero-modular-monoliths-in-dotnet/">From Zero to Hero: Modular Monoliths in .NET</a></li><li><a href="https://www.pluralsight.com/courses/refactoring-solid-c-sharp-code">Refactoring to SOLID C# Code</a> NEW!</li><li><a href="https://www.pluralsight.com/courses/aspdotnet-core-6-web-api-best-practices">ASP.NET Core 6 Web API: Best Practices</a></li><li><a href="https://www.pluralsight.com/courses/working-c-sharp-generics-best-practices">Working with C# Generics: Best Practices</a></li><li><a href="https://www.pluralsight.com/courses/fundamentals-domain-driven-design">Domain-Driven Design Fundamentals</a></li><li><a href="https://www.pluralsight.com/courses/refactoring-csharp-developers">Refactoring for C# Devs</a></li><li><a href="https://www.pluralsight.com/courses/kanban-getting-started">Kanban: Getting Started</a></li><li><a href="https://www.pluralsight.com/courses/csharp-solid-principles">SOLID Principles for C# Devs</a></li><li><a href="https://www.pluralsight.com/courses/design-patterns-overview">Design Patterns Overview</a></li></ul></div> <br/><div class="recent-post"><h2 style="font-size:22px;padding:7px;font-weight:BOLD"><span role="img" aria-label="clipboard">📋</span> CATEGORIES</h2> <br/><ul class="recent-post" style="text-transform:uppercase"><li><a href="/category/career-advice/">Career Advice<!-- --> (<!-- -->2<!-- -->)</a></li><li><a href="/category/iraq/">Iraq<!-- --> (<!-- -->158<!-- -->)</a></li><li><a href="/category/personal/">Personal<!-- --> (<!-- -->37<!-- -->)</a></li><li><a href="/category/productivity/">Productivity<!-- --> (<!-- -->168<!-- -->)</a></li><li><a href="/category/security/">Security<!-- --> (<!-- -->7<!-- -->)</a></li><li><a href="/category/software-development/">Software Development<!-- --> (<!-- -->960<!-- -->)</a></li><li><a href="/category/uncategorized/">Uncategorized<!-- --> (<!-- -->435<!-- -->)</a></li></ul> </div><div><br/><h4 style="font-size:22px;padding:7px;margin-left:15px;font-weight:BOLD"><span role="img" aria-label="book">📘</span> FREE ARCHITECTURE EBOOK</h4><br/><center><a href="/architecture-ebook"><img src="/static/Architecture-eBook-Cover-242x300-09d775f8f28cb004b00c47b84c574494.png" alt="book"/></a><h4><a href="/architecture-ebook">Get the Book!</a></h4></center><br/><h1 style="font-size:22px;padding:7px;margin-left:15px;font-weight:BOLD"><span role="img" aria-label="pen">🖊️</span> RECENT ARTICLES</h1><br/><div class="columns is-multiline"><div><article><header><div class="recent-post"><ul class="recent-post"><li><a href="/interfaces-describe-what-implementations-describe-how/">Interfaces Describe What - Implementations Describe How</a></li></ul></div></header></article></div><div><article><header><div class="recent-post"><ul class="recent-post"><li><a href="/you-should-blog/">You Should Blog</a></li></ul></div></header></article></div><div><article><header><div class="recent-post"><ul class="recent-post"><li><a href="/from-microservices-to-modular-monoliths/">From Microservices to Modular Monoliths</a></li></ul></div></header></article></div><div><article><header><div class="recent-post"><ul class="recent-post"><li><a href="/navigation-properties-between-aggregates-modules/">Modeling Navigation Properties Between Aggregates or Modules</a></li></ul></div></header></article></div><div><article><header><div class="recent-post"><ul class="recent-post"><li><a href="/comparing-unit-testable-code-with-maintainable-code/">Comparing Unit Testable Code with Maintainable Code</a></li></ul></div></header></article></div></div><br/><h1 style="font-size:22px;padding:7px;margin-left:15px;font-weight:BOLD"><span role="img" aria-label="bird">🐦</span> RECENT TWEETS</h1><a class="twitter-timeline" data-width="400" data-height="800" data-theme="light" href="https://twitter.com/ardalis?ref_src=twsrc%5Etfw" data-chrome="noscrollbar">Tweets by ardalis</a><script async="" src="https://platform.twitter.com/widgets.js" charSet="utf-8" type="text/javascript"></script></div><div></div></div></article></div></div></header></div></div></section></div><footer class="footer has-background-black has-text-white-ter"><div class="content has-text-centered has-background-black has-text-white-ter"><div class="container has-background-black has-text-white-ter"><div class="columns"><div class="column is-4"><form action="https://www.google.com/search" method="get"><input type="hidden" name="q" value="site:ardalis.com"/><input type="text" name="q" alt="search" class="googletextbox"/><input type="submit" value="Search my Site with Google" class="googletextbox"/></form><br/><a href="/interviews/">Interviews</a><br/><a href="/contact">Contact</a></div><div class="column is-4"><div class="content has-text-centered"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAB3RJTUUH5AUaFDIfzRKZlwAAHOhJREFUeNrtfX2YXFWZZzMEnB1BMDioOOQBIm6ehQG667zn3goGmFWIw6AYzaNx3WXGlbCSpPuec+6trxAM4jIjukwABQKLjqPP7owoMR/d95xz762u/qhOHBOZCREiMEElKCM7JIAQQj6es3+c6u6k6lZ13dvVXbeT/uM8Dw/p7rp1z++8X+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Vh0Q29tbWVudAD2zJa/AAAACnRFWHRDb3B5cmlnaHQArA/MOgAAAA50RVh0Q3JlYXRpb24gdGltZQA19w8JAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA1LTI2VDIwOjM5OjUzKzAwOjAwSCqP9AAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wNS0yNlQyMDozOTo1MyswMDowMDl3N0gAAAAMdEVYdERlc2NyaXB0aW9uABMJISMAAAALdEVYdERpc2NsYWltZXIAt8C0jwAAAAl0RVh0U29mdHdhcmUAXXD/OgAAAAd0RVh0U291cmNlAPX/g+sAAAAGdEVYdFRpdGxlAKju0icAAAAIdEVYdFdhcm5pbmcAwBvmhwAAAABJRU5ErkJggg==" alt="Ardalis" style="width:5em;height:5em"/><p>Copyright © 2024</p><br/></div></div><div class="column is-4 social"><a title="facebook" href="https://www.facebook.com/StevenAndrewSmith"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+RmFjZWJvb2sgaWNvbjwvdGl0bGU+PHBhdGggZD0iTTIyLjY3NiAwSDEuMzI0Qy41OTMgMCAwIC41OTMgMCAxLjMyNHYyMS4zNTJDMCAyMy40MDguNTkzIDI0IDEuMzI0IDI0aDExLjQ5NHYtOS4yOTRIOS42ODl2LTMuNjIxaDMuMTI5VjguNDFjMC0zLjA5OSAxLjg5NC00Ljc4NSA0LjY1OS00Ljc4NSAxLjMyNSAwIDIuNDY0LjA5NyAyLjc5Ni4xNDF2My4yNGgtMS45MjFjLTEuNSAwLTEuNzkyLjcyMS0xLjc5MiAxLjc3MXYyLjMxMWgzLjU4NGwtLjQ2NSAzLjYzSDE2LjU2VjI0aDYuMTE1Yy43MzMgMCAxLjMyNS0uNTkyIDEuMzI1LTEuMzI0VjEuMzI0QzI0IC41OTMgMjMuNDA4IDAgMjIuNjc2IDAiLz48L3N2Zz4=" alt="Facebook" style="width:1em;height:1em"/></a><a title="linkedin" href="https://www.linkedin.com/in/stevenandrewsmith"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+TGlua2VkSW4gaWNvbjwvdGl0bGU+PHBhdGggZD0iTTIwLjQ0NyAyMC40NTJoLTMuNTU0di01LjU2OWMwLTEuMzI4LS4wMjctMy4wMzctMS44NTItMy4wMzctMS44NTMgMC0yLjEzNiAxLjQ0NS0yLjEzNiAyLjkzOXY1LjY2N0g5LjM1MVY5aDMuNDE0djEuNTYxaC4wNDZjLjQ3Ny0uOSAxLjYzNy0xLjg1IDMuMzctMS44NSAzLjYwMSAwIDQuMjY3IDIuMzcgNC4yNjcgNS40NTV2Ni4yODZ6TTUuMzM3IDcuNDMzYy0xLjE0NCAwLTIuMDYzLS45MjYtMi4wNjMtMi4wNjUgMC0xLjEzOC45Mi0yLjA2MyAyLjA2My0yLjA2MyAxLjE0IDAgMi4wNjQuOTI1IDIuMDY0IDIuMDYzIDAgMS4xMzktLjkyNSAyLjA2NS0yLjA2NCAyLjA2NXptMS43ODIgMTMuMDE5SDMuNTU1VjloMy41NjR2MTEuNDUyek0yMi4yMjUgMEgxLjc3MUMuNzkyIDAgMCAuNzc0IDAgMS43Mjl2MjAuNTQyQzAgMjMuMjI3Ljc5MiAyNCAxLjc3MSAyNGgyMC40NTFDMjMuMiAyNCAyNCAyMy4yMjcgMjQgMjIuMjcxVjEuNzI5QzI0IC43NzQgMjMuMiAwIDIyLjIyMiAwaC4wMDN6Ii8+PC9zdmc+" alt="Linkedin" style="width:1em;height:1em"/></a><a title="twitter" href="https://twitter.com/ardalis"><img class="fas fa-lg" src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+VHdpdHRlciBpY29uPC90aXRsZT48cGF0aCBkPSJNMjMuOTU0IDQuNTY5Yy0uODg1LjM4OS0xLjgzLjY1NC0yLjgyNS43NzUgMS4wMTQtLjYxMSAxLjc5NC0xLjU3NCAyLjE2My0yLjcyMy0uOTUxLjU1NS0yLjAwNS45NTktMy4xMjcgMS4xODQtLjg5Ni0uOTU5LTIuMTczLTEuNTU5LTMuNTkxLTEuNTU5LTIuNzE3IDAtNC45MiAyLjIwMy00LjkyIDQuOTE3IDAgLjM5LjA0NS43NjUuMTI3IDEuMTI0QzcuNjkxIDguMDk0IDQuMDY2IDYuMTMgMS42NCAzLjE2MWMtLjQyNy43MjItLjY2NiAxLjU2MS0uNjY2IDIuNDc1IDAgMS43MS44NyAzLjIxMyAyLjE4OCA0LjA5Ni0uODA3LS4wMjYtMS41NjYtLjI0OC0yLjIyOC0uNjE2di4wNjFjMCAyLjM4NSAxLjY5MyA0LjM3NCAzLjk0NiA0LjgyNy0uNDEzLjExMS0uODQ5LjE3MS0xLjI5Ni4xNzEtLjMxNCAwLS42MTUtLjAzLS45MTYtLjA4Ni42MzEgMS45NTMgMi40NDUgMy4zNzcgNC42MDQgMy40MTctMS42OCAxLjMxOS0zLjgwOSAyLjEwNS02LjEwMiAyLjEwNS0uMzkgMC0uNzc5LS4wMjMtMS4xNy0uMDY3IDIuMTg5IDEuMzk0IDQuNzY4IDIuMjA5IDcuNTU3IDIuMjA5IDkuMDU0IDAgMTMuOTk5LTcuNDk2IDEzLjk5OS0xMy45ODYgMC0uMjA5IDAtLjQyLS4wMTUtLjYzLjk2MS0uNjg5IDEuOC0xLjU2IDIuNDYtMi41NDhsLS4wNDctLjAyeiIvPjwvc3ZnPg==" alt="Twitter" style="width:1em;height:1em"/></a><a title="youtube" href="https://www.youtube.com/ardalis/"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDI0IDI0Ij48dGl0bGU+WW91VHViZSBpY29uPC90aXRsZT48cGF0aCBkPSJNMjMuNDk1IDYuMjA1YTMuMDA3IDMuMDA3IDAgMCAwLTIuMDg4LTIuMDg4Yy0xLjg3LS41MDEtOS4zOTYtLjUwMS05LjM5Ni0uNTAxcy03LjUwNy0uMDEtOS4zOTYuNTAxQTMuMDA3IDMuMDA3IDAgMCAwIC41MjcgNi4yMDVhMzEuMjQ3IDMxLjI0NyAwIDAgMC0uNTIyIDUuODA1IDMxLjI0NyAzMS4yNDcgMCAwIDAgLjUyMiA1Ljc4MyAzLjAwNyAzLjAwNyAwIDAgMCAyLjA4OCAyLjA4OGMxLjg2OC41MDIgOS4zOTYuNTAyIDkuMzk2LjUwMnM3LjUwNiAwIDkuMzk2LS41MDJhMy4wMDcgMy4wMDcgMCAwIDAgMi4wODgtMi4wODggMzEuMjQ3IDMxLjI0NyAwIDAgMCAuNS01Ljc4MyAzMS4yNDcgMzEuMjQ3IDAgMCAwLS41LTUuODA1ek05LjYwOSAxNS42MDFWOC40MDhsNi4yNjQgMy42MDJ6Ii8+PC9zdmc+" alt="YouTube" style="width:1em;height:1em"/></a><a title="github" href="https://github.com/ardalis"><img src="data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+R2l0SHViIGljb248L3RpdGxlPjxwYXRoIGQ9Ik0xMiAuMjk3Yy02LjYzIDAtMTIgNS4zNzMtMTIgMTIgMCA1LjMwMyAzLjQzOCA5LjggOC4yMDUgMTEuMzg1LjYuMTEzLjgyLS4yNTguODItLjU3NyAwLS4yODUtLjAxLTEuMDQtLjAxNS0yLjA0LTMuMzM4LjcyNC00LjA0Mi0xLjYxLTQuMDQyLTEuNjFDNC40MjIgMTguMDcgMy42MzMgMTcuNyAzLjYzMyAxNy43Yy0xLjA4Ny0uNzQ0LjA4NC0uNzI5LjA4NC0uNzI5IDEuMjA1LjA4NCAxLjgzOCAxLjIzNiAxLjgzOCAxLjIzNiAxLjA3IDEuODM1IDIuODA5IDEuMzA1IDMuNDk1Ljk5OC4xMDgtLjc3Ni40MTctMS4zMDUuNzYtMS42MDUtMi42NjUtLjMtNS40NjYtMS4zMzItNS40NjYtNS45MyAwLTEuMzEuNDY1LTIuMzggMS4yMzUtMy4yMi0uMTM1LS4zMDMtLjU0LTEuNTIzLjEwNS0zLjE3NiAwIDAgMS4wMDUtLjMyMiAzLjMgMS4yMy45Ni0uMjY3IDEuOTgtLjM5OSAzLS40MDUgMS4wMi4wMDYgMi4wNC4xMzggMyAuNDA1IDIuMjgtMS41NTIgMy4yODUtMS4yMyAzLjI4NS0xLjIzLjY0NSAxLjY1My4yNCAyLjg3My4xMiAzLjE3Ni43NjUuODQgMS4yMyAxLjkxIDEuMjMgMy4yMiAwIDQuNjEtMi44MDUgNS42MjUtNS40NzUgNS45Mi40Mi4zNi44MSAxLjA5Ni44MSAyLjIyIDAgMS42MDYtLjAxNSAyLjg5Ni0uMDE1IDMuMjg2IDAgLjMxNS4yMS42OS44MjUuNTdDMjAuNTY1IDIyLjA5MiAyNCAxNy41OTIgMjQgMTIuMjk3YzAtNi42MjctNS4zNzMtMTItMTItMTIiLz48L3N2Zz4=" alt="GitHub" style="width:1em;height:1em"/></a><a title="mastodon" rel="me" href="https://fosstodon.org/@ardalis">Mastodon</a></div></div><div class="columns"><div class="column is-12"> <br/></div></div></div></div></footer></div></div><div id="gatsby-announcer" style="position:absolute;top:0;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0" aria-live="assertive" aria-atomic="true"></div></div><script id="gatsby-script-loader">/*<![CDATA[*/window.pagePath="/5-rules-dtos/";window.___webpackCompilationHash="9f072ce39b8c45e776d8";/*]]>*/</script><script id="gatsby-chunk-mapping">/*<![CDATA[*/window.___chunkMapping={"polyfill":["/polyfill-7da9e88def8c798a4eb9.js"],"app":["/app-405db4ecfef604df7c88.js"],"component---src-pages-404-js":["/component---src-pages-404-js-1976de88f000a167ddcd.js"],"component---src-pages-blog-xxindex-js":["/component---src-pages-blog-xxindex-js-6bcf93906ae77ae2d8f9.js"],"component---src-pages-category-index-js":["/component---src-pages-category-index-js-48d61f4a46bb641b8956.js"],"component---src-pages-contact-us-index-js":["/component---src-pages-contact-us-index-js-5b411c187d58149838fb.js"],"component---src-pages-contact-us-thanks-js":["/component---src-pages-contact-us-thanks-js-4628b8a932d6ba8aab4f.js"],"component---src-pages-search-js":["/component---src-pages-search-js-a08b213b54d487a46d0b.js"],"component---src-pages-tags-index-js":["/component---src-pages-tags-index-js-19205344ecd0edc99e53.js"],"component---src-templates-assessments-page-js":["/component---src-templates-assessments-page-js-6eb574b0cb3280515679.js"],"component---src-templates-blog-list-js":["/component---src-templates-blog-list-js-0654f80ec4fb1083e770.js"],"component---src-templates-blog-post-js":["/component---src-templates-blog-post-js-a0b924a3ca1633ff2ab9.js"],"component---src-templates-category-js":["/component---src-templates-category-js-fcf4126d77453579328c.js"],"component---src-templates-ebook-page-js":["/component---src-templates-ebook-page-js-bd3cc1f64c724e6b2225.js"],"component---src-templates-index-page-js":["/component---src-templates-index-page-js-e858569f1b057f1865d5.js"],"component---src-templates-interviews-page-js":["/component---src-templates-interviews-page-js-ba4485a2c98fe4cbe0d7.js"],"component---src-templates-mentoring-page-js":["/component---src-templates-mentoring-page-js-5bb43e188b85eb0ea5d8.js"],"component---src-templates-software-craftsmanship-2016-wall-calendar-sponsorship-page-js":["/component---src-templates-software-craftsmanship-2016-wall-calendar-sponsorship-page-js-336fba6ad39c3dd88394.js"],"component---src-templates-tags-js":["/component---src-templates-tags-js-be64cf526cda48ad19f7.js"],"component---src-templates-tips-page-js":["/component---src-templates-tips-page-js-46547b7f6de4bc8075e7.js"],"component---src-templates-tools-used-page-js":["/component---src-templates-tools-used-page-js-57cf6d51808846c98f3d.js"],"component---src-templates-training-classes-page-js":["/component---src-templates-training-classes-page-js-9f8bb3852c890a4a7db3.js"]};/*]]>*/</script><script src="/polyfill-7da9e88def8c798a4eb9.js" nomodule=""></script><script src="/app-405db4ecfef604df7c88.js" async=""></script><script src="/532a2f07-f97befafd74bf8dd0311.js" async=""></script><script src="/framework-3a4fd0dc0ae7f6fdcce7.js" async=""></script><script src="/webpack-runtime-3c5edcbff810762fe2d4.js" async=""></script></body></html>

Pages: 1 2 3 4 5 6 7 8 9 10