# C1.Data.Entities.EntityClientScope

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Data_Entities_EntityClientScope" data-uid="C1.Data.Entities.EntityClientScope" class="text-break">EntityClientScope Class
</h1>
  <div class="markdown level0 summary"><p>Defines a scope of data access. Provides facilities to create <a class="xref" href="C1.Data.ClientView-1.html">client views</a>.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.Data.ClientScope.html">ClientScope</a></div>
    <div class="level2"><span class="xref">EntityClientScope</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Data.Entities.html">C1.Data.Entities</a></h6>
  <h6><strong>Assembly</strong>: C1.Data.Entity.4.8.dll</h6>
  <h5 id="C1_Data_Entities_EntityClientScope_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class EntityClientScope : ClientScope, IDisposable</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class EntityClientScope
    Inherits ClientScope
    Implements IDisposable</code></pre>
  </div>
  <h5 id="C1_Data_Entities_EntityClientScope_remarks"><strong>Remarks</strong></h5>
  <div class="markdown level0 remarks"><p>Usually, one scope is created for each window/user control, and disposed at the end of its lifetime.
Entities <a class="xref" href="C1.Data.ClientScope.AddRef.html#C1_Data_ClientScope_AddRef_System_Object_">pinned to the scope (marked as needed)</a> are not evicted from the cache
until the scope is <a class="xref" href="C1.Data.ClientScope.Dispose.html#C1_Data_ClientScope_Dispose">disposed</a> or collected by the GC.</p>
</div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Data_Entities_EntityClientScope__ctor_C1_Data_Entities_EntityClientCache_" data-uid="C1.Data.Entities.EntityClientScope.#ctor(C1.Data.Entities.EntityClientCache)">
          <a class="xref" href="C1.Data.Entities.EntityClientScope.-ctor.html#C1_Data_Entities_EntityClientScope__ctor_C1_Data_Entities_EntityClientCache_">EntityClientScope(EntityClientCache)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Data.Entities.EntityClientScope.html">EntityClientScope</a> class with the specified <a class="xref" href="C1.Data.Entities.EntityClientCache.html">EntityClientCache</a>.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Data_Entities_EntityClientScope_ClientCache" data-uid="C1.Data.Entities.EntityClientScope.ClientCache">
          <a class="xref" href="C1.Data.Entities.EntityClientScope.ClientCache.html#C1_Data_Entities_EntityClientScope_ClientCache">ClientCache</a>
        </td>
        <td class="markdown level1 summary"><p>Gets the <a class="xref" href="C1.Data.Entities.EntityClientCache.html">EntityClientCache</a> to which this <a class="xref" href="C1.Data.Entities.EntityClientScope.html">client scope</a> is connected.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Data_Entities_EntityClientScope_GetItems__1" data-uid="C1.Data.Entities.EntityClientScope.GetItems``1">
          <a class="xref" href="C1.Data.Entities.EntityClientScope.GetItems.html#C1_Data_Entities_EntityClientScope_GetItems__1">GetItems&lt;T&gt;()</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="C1.Data.ClientView-1.html">client view</a> of entities of a given type.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Data_Entities_EntityClientScope_GetItems__1_System_String_" data-uid="C1.Data.Entities.EntityClientScope.GetItems``1(System.String)">
          <a class="xref" href="C1.Data.Entities.EntityClientScope.GetItems.html#C1_Data_Entities_EntityClientScope_GetItems__1_System_String_">GetItems&lt;T&gt;(string)</a>
        </td>
        <td class="markdown level1 summary"><p>Gets a <a class="xref" href="C1.Data.ClientView-1.html">client view</a> of entities from the specified <code class="paramref">entitySetName</code>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
