<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ali Bayat</title>
    <description>The latest articles on DEV Community by Ali Bayat (@alibayatgh).</description>
    <link>https://dev.to/alibayatgh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F327519%2F1a5e9c2f-3a5b-4461-8af6-1b27f8d3969a.jpg</url>
      <title>DEV Community: Ali Bayat</title>
      <link>https://dev.to/alibayatgh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alibayatgh"/>
    <language>en</language>
    <item>
      <title>Answer: How do I update an existing document inside ElasticSearch index using NEST?</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Mon, 20 Dec 2021 00:16:51 +0000</pubDate>
      <link>https://dev.to/alibayatgh/answer-how-do-i-update-an-existing-document-inside-elasticsearch-index-using-nest-40hd</link>
      <guid>https://dev.to/alibayatgh/answer-how-do-i-update-an-existing-document-inside-elasticsearch-index-using-nest-40hd</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/23796286/how-do-i-update-an-existing-document-inside-elasticsearch-index-using-nest/58832740#58832740" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: How do I update an existing document inside ElasticSearch index using NEST?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Nov 13 '19&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/23796286/how-do-i-update-an-existing-document-inside-elasticsearch-index-using-nest/58832740#58832740" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          20
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;A better solution in Nest 7.x:&lt;/p&gt;
&lt;pre class="lang-cs prettyprint-override"&gt;&lt;code&gt;await _client.UpdateAsync&amp;lt;ElasticSearchDoc&amp;gt;(doc.Id, u =&amp;gt; u
  .Index("movies")
  .Doc(new ElasticSearchDoc { Title = "Updated title!" }));
&lt;/code&gt;&lt;/pre&gt;

    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/23796286/how-do-i-update-an-existing-document-inside-elasticsearch-index-using-nest/58832740#58832740" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: Why are commands and events separately represented?</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Mon, 16 Aug 2021 04:21:30 +0000</pubDate>
      <link>https://dev.to/alibayatgh/answer-why-are-commands-and-events-separately-represented-anc</link>
      <guid>https://dev.to/alibayatgh/answer-why-are-commands-and-events-separately-represented-anc</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/4962755/why-are-commands-and-events-separately-represented/55324818#55324818" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: Why are commands and events separately represented?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Mar 24 '19&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/4962755/why-are-commands-and-events-separately-represented/55324818#55324818" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          18
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;The &lt;strong&gt;event&lt;/strong&gt; is a fact from the past.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;command&lt;/strong&gt; is only a request, and thus may be refused.&lt;/p&gt;
&lt;div class="s-table-container"&gt;
&lt;div class="table-wrapper-paragraph"&gt;&lt;table class="s-table"&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Commands&lt;/th&gt;
&lt;th&gt;Events&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Purpose&lt;/td&gt;
&lt;td&gt;Invoke Behavior&lt;/td&gt;
&lt;td&gt;Something Happened&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ownership&lt;/td&gt;
&lt;td&gt;Command Owned by Consumer&lt;/td&gt;
&lt;td&gt;Event Owned by Publisher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Consumers&lt;/td&gt;
&lt;td&gt;One Consumer&lt;/td&gt;
&lt;td&gt;Zero or Many Consumers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Senders&lt;/td&gt;
&lt;td&gt;Many Senders&lt;/td&gt;
&lt;td&gt;Single Publisher&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Naming&lt;/td&gt;
&lt;td&gt;Verb&lt;/td&gt;
&lt;td&gt;Past&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;…&lt;/div&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/4962755/why-are-commands-and-events-separately-represented/55324818#55324818" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: When to use record vs class vs struct</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Wed, 19 May 2021 14:17:22 +0000</pubDate>
      <link>https://dev.to/alibayatgh/answer-when-to-use-record-vs-class-vs-struct-2k9j</link>
      <guid>https://dev.to/alibayatgh/answer-when-to-use-record-vs-class-vs-struct-2k9j</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/64816714/when-to-use-record-vs-class-vs-struct/67604868#67604868" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: When to use record vs class vs struct
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;May 19 '21&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/64816714/when-to-use-record-vs-class-vs-struct/67604868#67604868" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          18
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;You can use &lt;strong&gt;structure&lt;/strong&gt; types to design data-centric types that provide &lt;strong&gt;value equality&lt;/strong&gt; and &lt;strong&gt;little or no behavior&lt;/strong&gt;. But for relatively large data models, structure types have some &lt;strong&gt;disadvantages&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;They don't support &lt;strong&gt;inheritance&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;They're less efficient at determining &lt;strong&gt;value equality&lt;/strong&gt;. For value types, the &lt;code&gt;ValueType.Equals&lt;/code&gt; method…&lt;/li&gt;
&lt;/ul&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/64816714/when-to-use-record-vs-class-vs-struct/67604868#67604868" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: Annotation-Based vs Code-First in Hot Chocolate</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Wed, 14 Apr 2021 10:37:07 +0000</pubDate>
      <link>https://dev.to/alibayatgh/answer-annotation-based-vs-code-first-in-hot-chocolate-32np</link>
      <guid>https://dev.to/alibayatgh/answer-annotation-based-vs-code-first-in-hot-chocolate-32np</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/67042561/annotation-based-vs-code-first-in-hot-chocolate/67042849#67042849" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: Annotation-Based vs Code-First in Hot Chocolate
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Apr 11 '21&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/67042561/annotation-based-vs-code-first-in-hot-chocolate/67042849#67042849" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          2
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;strong&gt;Annotation-Based or Pure Code-First&lt;/strong&gt;: In this approach, we don't bother about GraphQL schema types, we will just write clean C# code that automatically translates to GraphQL types.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Code-first&lt;/strong&gt;: In this approach,  we use &lt;code&gt;Schema types&lt;/code&gt;, &lt;em&gt;Schema types&lt;/em&gt; allow us to keep the GraphQL type configuration separate from…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/67042561/annotation-based-vs-code-first-in-hot-chocolate/67042849#67042849" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: What is the difference between the Facade and Adapter Pattern?</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Mon, 15 Jun 2020 07:26:58 +0000</pubDate>
      <link>https://dev.to/alibayatgh/answer-what-is-the-difference-between-the-facade-and-adapter-pattern-2o8h</link>
      <guid>https://dev.to/alibayatgh/answer-what-is-the-difference-between-the-facade-and-adapter-pattern-2o8h</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/2961307/what-is-the-difference-between-the-facade-and-adapter-pattern/62383302#62383302" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: What is the difference between the Facade and Adapter Pattern?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jun 15 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/2961307/what-is-the-difference-between-the-facade-and-adapter-pattern/62383302#62383302" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          2
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;The main goal of the &lt;em&gt;Facade&lt;/em&gt; pattern is to make the class or subsystem easier to use, while the main goal of the &lt;em&gt;Adapter&lt;/em&gt; pattern is to adjust the interface to what the client expects. &lt;/p&gt;

    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/2961307/what-is-the-difference-between-the-facade-and-adapter-pattern/62383302#62383302" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>IOptionsMonitor vs. IOptionsSnapshot</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Thu, 21 May 2020 07:32:58 +0000</pubDate>
      <link>https://dev.to/alibayatgh/ioptionsmonitor-vs-ioptionssnapshot-5ae5</link>
      <guid>https://dev.to/alibayatgh/ioptionsmonitor-vs-ioptionssnapshot-5ae5</guid>
      <description>&lt;p&gt;&lt;a href="https://stackoverflow.com/a/61929399/3427324"&gt;https://stackoverflow.com/a/61929399/3427324&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is Data Partitioning?</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Tue, 14 Apr 2020 16:05:35 +0000</pubDate>
      <link>https://dev.to/alibayatgh/what-is-data-partitioning-171o</link>
      <guid>https://dev.to/alibayatgh/what-is-data-partitioning-171o</guid>
      <description>&lt;p&gt;The data storage for a software system can often be a bottleneck. If you try to run an application using a single database server, as you scale, you'll soon reach the limits of a single machine, even as you pay for a bigger, more expensive machine with more CPUs and memory. This is where data partitioning can help. &lt;br&gt;
Here's a simple example. A block blob in Azure Storage currently has a maximum size of just under 5 TB. Five terabytes is a large blob, but what if you have 8 TB of data to store? Well, you'd need to partition your data across multiple blobs. You could, for example, store 4 TB in blob 1 and another 4 TB in blob 2. &lt;br&gt;
That's a simple example of partitioning. Now let's talk about three specific types of partitioning. First, imagine you need to store orders in your application and an order consists of five attributes. We'll just call them &lt;em&gt;A&lt;/em&gt;, &lt;em&gt;B&lt;/em&gt;, &lt;em&gt;C&lt;/em&gt;, &lt;em&gt;D&lt;/em&gt;, and &lt;em&gt;E&lt;/em&gt;. These attributes could be columns in a relational database or properties in a document-oriented database, but let's also say that the application frequently accesses attributes &lt;em&gt;A&lt;/em&gt; and &lt;em&gt;D&lt;/em&gt;, but rarely accesses &lt;em&gt;B&lt;/em&gt;, &lt;em&gt;C&lt;/em&gt;, and &lt;em&gt;E&lt;/em&gt;.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RUgjJTvy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://s10.picofile.com/file/8394037976/VerticalPartitioning.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RUgjJTvy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://s10.picofile.com/file/8394037976/VerticalPartitioning.png" alt="Vertical Partitioning" width="635" height="681"&gt;&lt;/a&gt;&lt;br&gt;
In that scenario, we can &lt;strong&gt;vertically partition&lt;/strong&gt; orders so that &lt;em&gt;A&lt;/em&gt; and &lt;em&gt;D&lt;/em&gt; are stored separately from &lt;em&gt;B&lt;/em&gt;, &lt;em&gt;C&lt;/em&gt;, and &lt;em&gt;E&lt;/em&gt;. This could have a few benefits. For example, there could be less contention in a database if the attributes are separate and the tables are not as wide, or we could store A and D in fast premium storage while &lt;em&gt;B&lt;/em&gt;, &lt;em&gt;C&lt;/em&gt;, and &lt;em&gt;E&lt;/em&gt; stay in less expensive storage. Also, &lt;em&gt;A&lt;/em&gt; and &lt;em&gt;D&lt;/em&gt; would be less information and easier to cache and faster to replicate so there are several opportunities when using vertical partitioning to optimize your data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--otSFe2lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://s11.picofile.com/file/8394038084/HorizontalPartitioning.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--otSFe2lv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://s11.picofile.com/file/8394038084/HorizontalPartitioning.png" alt="Horizontal Partitioning" width="523" height="655"&gt;&lt;/a&gt;&lt;br&gt;
Another approach with orders is to spread the order data across multiple data sources. This is what we call &lt;strong&gt;horizontal partitioning&lt;/strong&gt;, and horizontal partitioning is a popular approach to scaling data because this approach gives you a lot of power that you can use for scalability and performance. One approach to horizontal partitioning is to use what we call range partitioning. I could say that all the orders for customers A through M go to one database, while all the orders for customers &lt;em&gt;M&lt;/em&gt; through &lt;em&gt;Z&lt;/em&gt; go to a different database. A range could also be temporal. So I could say all the orders for this month go to one database and all the orders for last month go to a different database, or I could have a hashing algorithm that places orders into different databases in a more round-robin fashion. You can almost think of it like load balancing for databases. The choice here really depends on the application and the data and how the data is used, but in a horizontal partition, I used the same schema or same document shape in all the different databases, but since I'm spreading the data out, it's easier to scale out my hardware and add more processing power as my data grows.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0hYfwIjW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://s11.picofile.com/file/8394038342/FunctionalPartitioning.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0hYfwIjW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/http://s11.picofile.com/file/8394038342/FunctionalPartitioning.jpg" alt="Functional Partitioning" width="629" height="655"&gt;&lt;/a&gt;&lt;br&gt;
Finally, there's also what we call &lt;strong&gt;functional partitioning&lt;/strong&gt;. Let's say for this scenario our system stores orders and also stores invoices. In functional partitioning, these two datasets could live in different data sources that are optimized for the data and the system that uses the data. So we could use a relational database for orders and a document-based database for invoices. This sounds complicated, which is true. You don't necessarily want to use functional partitioning for a simple application, but for large systems, for large data, for a scalable system, functional partitioning is one partitioning strategy to evaluate so you can match up the best data store for your data and application data access patterns.&lt;/p&gt;

&lt;p&gt;So I can not tell you which partitioning strategy is best for your application. I can just tell you that if you need to be highly scalable, you should evaluate a partitioning strategy and yes, partitioning can complicate your design and implementation. It can be difficult, for example, to join data across partitions or enforce transactions across partitions. &lt;/p&gt;

</description>
    </item>
    <item>
      <title>How can I optimize read access?</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Thu, 26 Mar 2020 17:37:38 +0000</pubDate>
      <link>https://dev.to/alibayatgh/how-can-i-optimize-read-access-b4f</link>
      <guid>https://dev.to/alibayatgh/how-can-i-optimize-read-access-b4f</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/38558785/how-can-i-optimize-read-access" rel="noopener noreferrer"&gt;
            How can I optimize read access?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jul 25 '16&lt;/span&gt;
            &lt;span&gt;Comments: 1&lt;/span&gt;
            &lt;span&gt;Answers: 2&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/38558785/how-can-i-optimize-read-access" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          1
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;I work on data that is mostly read and I want to perform these works as efficiently as possible, and I need to provide thread-safe access to it.&lt;/p&gt;

&lt;p&gt;Any explanations on my problem would be welcome. Thanks&lt;/p&gt;

    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/38558785/how-can-i-optimize-read-access" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Question&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>HTTP Error 500.19 in IIS 10 and Visual Studio</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Fri, 28 Feb 2020 17:36:44 +0000</pubDate>
      <link>https://dev.to/alibayatgh/http-error-500-19-in-iis-10-and-visual-studio-32pf</link>
      <guid>https://dev.to/alibayatgh/http-error-500-19-in-iis-10-and-visual-studio-32pf</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/45415832/http-error-500-19-in-iis-10-and-visual-studio-2017/46049001#46049001" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: HTTP Error 500.19 in IIS 10 and Visual Studio 2017
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Sep  5 '17&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/45415832/http-error-500-19-in-iis-10-and-visual-studio-2017/46049001#46049001" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          37
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;ol&gt;
&lt;li&gt;Press Win Key+R to Open Run Window&lt;/li&gt;
&lt;li&gt;in the Run Window, enter "OptionalFeatures.exe"&lt;/li&gt;
&lt;li&gt;in the features window, Click: "Internet Information Services"&lt;/li&gt;
&lt;li&gt;Click: "World Wide Web Services"&lt;/li&gt;
&lt;li&gt;Click: "Application Development Features"&lt;/li&gt;
&lt;li&gt;Check the features.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;I'm using Windows 10&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: "You must be signed in as an administrator
to be able to…&lt;/p&gt;
&lt;/blockquote&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/45415832/http-error-500-19-in-iis-10-and-visual-studio-2017/46049001#46049001" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>What are the differences between app.UseRouting() and app.UseEndPoints()?</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Fri, 28 Feb 2020 08:31:50 +0000</pubDate>
      <link>https://dev.to/alibayatgh/what-are-the-differences-between-app-userouting-and-app-useendpoints-5ekf</link>
      <guid>https://dev.to/alibayatgh/what-are-the-differences-between-app-userouting-and-app-useendpoints-5ekf</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/57846127/what-are-the-differences-between-app-userouting-and-app-useendpoints/59966192#59966192" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: What are the differences between app.UseRouting() and app.UseEndPoints()?
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Jan 29 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/57846127/what-are-the-differences-between-app-userouting-and-app-useendpoints/59966192#59966192" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          86
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;strong&gt;UseRouting&lt;/strong&gt;: Matches request to an endpoint.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;UseEndpoints&lt;/strong&gt;: Execute the matched endpoint.&lt;/p&gt;
&lt;p&gt;It decouples the route matching and resolution functionality from the endpoint executing functionality, which until now was all bundled in with the MVC middleware.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;This makes the ASP.NET Core framework more flexible and allows other
middlewares to…&lt;/p&gt;
&lt;/blockquote&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/57846127/what-are-the-differences-between-app-userouting-and-app-useendpoints/59966192#59966192" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
    <item>
      <title>Answer: HttpClientFactory.Create vs new HttpClient</title>
      <dc:creator>Ali Bayat</dc:creator>
      <pubDate>Thu, 27 Feb 2020 12:49:28 +0000</pubDate>
      <link>https://dev.to/alibayatgh/answer-httpclientfactory-create-vs-new-httpclient-5em2</link>
      <guid>https://dev.to/alibayatgh/answer-httpclientfactory-create-vs-new-httpclient-5em2</guid>
      <description>&lt;div class="ltag__stackexchange--container"&gt;
  &lt;div class="ltag__stackexchange--title-container"&gt;
    
      &lt;div class="ltag__stackexchange--title"&gt;
        &lt;div class="ltag__stackexchange--header"&gt;
          &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AoTUKOcU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackoverflow-logo-b42691ae545e4810b105ee957979a853a696085e67e43ee14c5699cf3e890fb4.svg" alt=""&gt;
          &lt;a href="https://stackoverflow.com/questions/18976042/httpclientfactory-create-vs-new-httpclient/60428381#60428381" rel="noopener noreferrer"&gt;
            &lt;span class="title-flare"&gt;answer&lt;/span&gt; re: HttpClientFactory.Create vs new HttpClient
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="ltag__stackexchange--post-metadata"&gt;
          &lt;span&gt;Feb 27 '20&lt;/span&gt;
        &lt;/div&gt;
      &lt;/div&gt;
      &lt;a class="ltag__stackexchange--score-container" href="https://stackoverflow.com/questions/18976042/httpclientfactory-create-vs-new-httpclient/60428381#60428381" rel="noopener noreferrer"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oeieW07A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-up-eff2e2849e67d156181d258e38802c0b57fa011f74164a7f97675ca3b6ab756b.svg" alt=""&gt;
        &lt;div class="ltag__stackexchange--score-number"&gt;
          36
        &lt;/div&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--h2-sXgSn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev.to/assets/stackexchange-arrow-down-4349fac0dd932d284fab7e4dd9846f19a3710558efde0d2dfd05897f3eeb9aba.svg" alt=""&gt;
      &lt;/a&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--body"&gt;
    
&lt;p&gt;&lt;code&gt;IHttpClientFactory&lt;/code&gt; offers the following benefits:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Naming and configuring logical &lt;code&gt;HttpClient&lt;/code&gt; instances.&lt;/li&gt;
&lt;li&gt;Build an &lt;strong&gt;outgoing request middleware&lt;/strong&gt; to manage
&lt;em&gt;cross-cutting concerns&lt;/em&gt; around HTTP requests.&lt;/li&gt;
&lt;li&gt;Integrates with &lt;em&gt;Polly&lt;/em&gt; for transient fault handling.&lt;/li&gt;
&lt;li&gt;Avoid common &lt;em&gt;DNS&lt;/em&gt; problems by managing &lt;code&gt;HttpClient&lt;/code&gt; lifetimes.&lt;/li&gt;
&lt;li&gt;Adds &lt;em&gt;logging&lt;/em&gt; for all requests sent through clients created by the
factory.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;…&lt;/p&gt;
    
  &lt;/div&gt;
  &lt;div class="ltag__stackexchange--btn--container"&gt;
    &lt;a href="https://stackoverflow.com/questions/18976042/httpclientfactory-create-vs-new-httpclient/60428381#60428381" class="ltag__stackexchange--btn" rel="noopener noreferrer"&gt;Open Full Answer&lt;/a&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
    </item>
  </channel>
</rss>
