<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://mail.logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Linking_Tables_in_Repository</id>
		<title>Linking Tables in Repository - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://mail.logicwiki.co.uk/index.php?action=history&amp;feed=atom&amp;title=Linking_Tables_in_Repository"/>
		<link rel="alternate" type="text/html" href="https://mail.logicwiki.co.uk/index.php?title=Linking_Tables_in_Repository&amp;action=history"/>
		<updated>2026-07-05T05:52:06Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>https://mail.logicwiki.co.uk/index.php?title=Linking_Tables_in_Repository&amp;diff=1973&amp;oldid=prev</id>
		<title>AliIybar at 11:04, 17 September 2019</title>
		<link rel="alternate" type="text/html" href="https://mail.logicwiki.co.uk/index.php?title=Linking_Tables_in_Repository&amp;diff=1973&amp;oldid=prev"/>
				<updated>2019-09-17T11:04:21Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;' lang='en'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 11:04, 17 September 2019&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l31&quot; &gt;Line 31:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 31:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; modelBuilder.Entity&amp;lt;PossibleAnswer&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; modelBuilder.Entity&amp;lt;PossibleAnswer&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Ignoring Query Filters ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;blogs = db.Blogs&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; .Include(b =&amp;gt; b.Posts)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; .IgnoreQueryFilters()&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; .ToList();&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------------&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;--------------&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[AutoMapper]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[AutoMapper]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>AliIybar</name></author>	</entry>

	<entry>
		<id>https://mail.logicwiki.co.uk/index.php?title=Linking_Tables_in_Repository&amp;diff=1972&amp;oldid=prev</id>
		<title>AliIybar: Created page with &quot;== Include / ThenInclude == &lt;pre&gt;  public Proposal GetProposal(long proposalId)         {             var retVal1 = _vdsContext.vds_Proposal                 .Include(k =&gt; k.Vd...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mail.logicwiki.co.uk/index.php?title=Linking_Tables_in_Repository&amp;diff=1972&amp;oldid=prev"/>
				<updated>2019-09-17T11:03:13Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Include / ThenInclude == &amp;lt;pre&amp;gt;  public Proposal GetProposal(long proposalId)         {             var retVal1 = _vdsContext.vds_Proposal                 .Include(k =&amp;gt; k.Vd...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Include / ThenInclude ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 public Proposal GetProposal(long proposalId)&lt;br /&gt;
        {&lt;br /&gt;
            var retVal1 = _vdsContext.vds_Proposal&lt;br /&gt;
                .Include(k =&amp;gt; k.VdsProposalSection)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.Section)&lt;br /&gt;
                .Include(k =&amp;gt; k.VdsProposalSection)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.ProposalQuestion)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.Question)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.QuestionType)&lt;br /&gt;
                .Include(k =&amp;gt; k.VdsProposalSection)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.ProposalQuestion)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.ProposalQuestionAnswer)&lt;br /&gt;
                .ThenInclude(k =&amp;gt; k.PossibleAnswer)&lt;br /&gt;
                .Where(t =&amp;gt; t.ProposalId == proposalId &amp;amp;&amp;amp; t.IsDeleted == false);&lt;br /&gt;
                &lt;br /&gt;
            return retVal1.FirstOrDefault();&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Eliminating Soft Deletes ==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
        protected override void OnModelCreating(ModelBuilder modelBuilder)&lt;br /&gt;
        {&lt;br /&gt;
            modelBuilder.Entity&amp;lt;Proposal&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;br /&gt;
            modelBuilder.Entity&amp;lt;ProposalQuestion&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;br /&gt;
            modelBuilder.Entity&amp;lt;ProposalQuestionAnswer&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;br /&gt;
&lt;br /&gt;
            modelBuilder.Entity&amp;lt;Question&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;br /&gt;
            modelBuilder.Entity&amp;lt;QuestionType&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;br /&gt;
            modelBuilder.Entity&amp;lt;PossibleAnswer&amp;gt;().HasQueryFilter(p =&amp;gt; !p.IsDeleted);&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--------------&lt;br /&gt;
See [[AutoMapper]]&lt;/div&gt;</summary>
		<author><name>AliIybar</name></author>	</entry>

	</feed>