title: Can partial class access static methods in C#?
body: <p>The tutorial application, <a href="http://mvcmusicstore.codeplex.com/" rel="nofollow noreferrer">MusicStore -MVC3 (92 PageNo)</a>, created a POCO class like: </p>
  
  <pre><code>public partial class ShoppingCart
      {
          MusicStoreEntities storeDB = new MusicStoreEntities();
  
          public static ShoppingCart GetCart(HttpContextBase context)
          {
              var cart = new ShoppingCart();
              cart.ShoppingCartId = cart.GetCartId(context);
              return cart;
          }
       }
  </code></pre>
  
  <p>How can we access static method in partial classes? In my opinion, we cannot access static methods in a partial class. The <code>partial</code> attribute means other parts of the class will be included in the namespace. In this scenario, I do not know where this other partial class is implemented.</p>
  
  <p>My questions about this static method are:</p>
  
  <ol>
  <li>Can we access static methods in partial classes? If so, how? </li>
  <li>Where is this partial class implemented in this MusicStore application? I am not able to find the other part of this class's implementation.</li>
  </ol>
  
  <p><strong>Updated:</strong> There is no other <code>ShoppingCart</code> class in the <code>models</code> directory. Does anyone know where that partial implementation would be? </p>