title: How to Expose Class Types from a Component within a DLL
body: <p>I am using a component from a company called Devart. This component produces a data model very much like Entity Framework except it is for SQLite. I have my data models and data context, etc very similar to the way Entity Framework works.</p>
  <p>I created a Windows .NetFramework DLL Class Library that I will use to handle many of my database related activities. Within this DLL I have my data models and data context which of course contain all of my table class types etc.</p>
  <p>Inside my DLL I can write the following code:</p>
  <pre><code>   public dbSales.tbl_Customers GetCustomer_byCustomerID(int _customerID)
     {
            dbSales.tbl_Customers selectedCustomer = (from dbContext.tbl_Customers 
                                                      where i.CustID == _customerID 
                                                       Select i).FirstOrDefault();
     }
  </code></pre>
  <p>Then in my other program I want to reference the DLL and that method to retrieve data. I do not know how to expose the types for my tables so that I can do the following: my DLL contains a class called DataHelper.</p>
  <p>(The code is written in expanded form for clarity)</p>
  <pre><code>DataHandler.DataHelper.tbl_Customers selectedCustomer = new DataHandler.DataHelper.tbl_Customers();
  selectedCustomer = DataHandler.DataHelper.GetCustomer_byCustomerID(45);
  </code></pre>
  <p>I do not know how to expose the type: tbl_Customers. It is simply my ignorance. The only work around I have found is to do the following using var. I like to be able to specify my types though and do not like using var. The following works:</p>
  <pre><code>var selectedCustomer = DataHandler.DataHelper.GetCustomer_byCustomerID(45);
  </code></pre>
  <p>I've tried making different things public such as the model, or the context, etc. But still it is as if I am only exposing methods and properties. I am simply ignorant about types and how to work with them. I honestly would like to find a good book that explains types and how to work with them.</p>
  <p>If anyone can provide assistance with this, it would be greatly appreciated.</p>