Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing Entity Framework with historical data
    primarykey
    data
    text
    <p>I'm building a windows application in .Net 4.0 to create and organize electronics projects. The main purpose of the application is to record the vendor information for the electronics components (part #, description, price, etc.) and organize (associate) them into projects (finished products). One of the requirements is to track changes for any given vendor item (mainly price) and changes at the project level to provide a point-in-time statistics at both component level and project level details for changes.</p> <p>I decided to use Entity Framework 4 for my data access layer with SQL CE 3.5 for the database, given the simplicity of client deployment. The data access works great, but when attempting to create the relationships (associations) between objects, the framework doesn't appear to have any obvious way to use historical data. This is my first attempt at using the entity framework, so I figured it might just be my inexperience that's keeping me from finding the answer. Here's my basic schema:</p> <p>I have 3 main tables: Project, Product, and ProjectProduct</p> <p>The Project and Product tables each have an ID column and a DateAdded column which are used as the complex key. The ProjectProducts table has the IDs for each of the other two tables and maintains the many-to-many relationships between the entities. The relationship table also has a DateAdded column to track changes in the product / project associations.</p> <p>While the Entity Framework seems to work great with maintaining associations that are direct (no date criteria) using the standard code-generated data objects, it's a bit confusing on how to get it to load the associations for a point-in-time historical data schema. Essentially I need to be able to load the data objects based on the date criteria for the point-in-time requirements (parametrized loading).</p> <p>Has anyone done anything similar and can point me in the right direction?</p> <p>Sorry for the long explanation, but thanks in advance for any help you can provide!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload