Attached here is the finished sample project, created by following the steps outlined in the IdeaBlade DevForce – Model Setup Walk-through: Background Step 1: The Entity Framework Project Step 2: The DevForce Projects Attached Code: Sample Code Notes: Of course I had to adjust the connection string in the ModelEF's app.config file. The SQL to … Continue reading IdeaBlade DevForce – Model Setup Walk-through – Sample Code
Entity Framework
Configure the Key when using Views as the basis for Entities
When using a View as the basis for an Entity in the Entity Framework (rather than a Table), make sure that the Key fields/properties are configured properly in the Model (EDMX). We recently experienced an anomaly where a Select All from a View-based Entity was not returning All the Entities we expected. There weren't any … Continue reading Configure the Key when using Views as the basis for Entities
Purpose and Principles of the Data Layer
At its core, the Data Layer’s main purpose is: Data Layer’s Main Purpose: To abstract all interactions with the database so that business objects can be written to deal with business rules, not with database interaction. For example, when promoting a standard Deal, the business logic comprises: validate that the Deal is in a promotable … Continue reading Purpose and Principles of the Data Layer
IdeaBlade DevForce – Model Setup Walk-through – Step 1: The Entity Framework Project
Our Problem: We need to create an Enterprise application that is web-based, has an Excel-ish interface and pulls data from an Oracle database. Technologies Chosen*: Silverlight for the UI Prism 2 for the modular framework Unity for DI IdeaBlade DevForce for the Business Object Layer and Async functionality MS Entity Framework for the ORM DevArt … Continue reading IdeaBlade DevForce – Model Setup Walk-through – Step 1: The Entity Framework Project
IdeaBlade DevForce – Model Setup Walk-through – Background
I know the world is about to change in April when VS2010 goes live, however, we are still using VS2008 and will be for at least a few more weeks. In the hopes that this walk-through provides some insight to someone, even if it is just me, here goes. Background We are creating a Silverlight … Continue reading IdeaBlade DevForce – Model Setup Walk-through – Background
Moving Code from the Developer’s Integration Environment to the QA Environment
When we've completed coding (and, if we're feeling especially adventurous, testing said code), we promote our locally developed code to the Dev server. This serves as our integration environment. CruiseControl.Net watches our SCM for any changes promoted to the DEV branch, then it: Updates the configuration files to point to the Dev server instead of … Continue reading Moving Code from the Developer’s Integration Environment to the QA Environment
Why does he keep saying EDML instead of EDMX?
In the Microsoft Entity Framework (EF), the GUI for the Entity Model is called the Entity Designer. When you create an Entity Model, the model itself is stored in an XML file named model.EDMX. The EDMX file is: a) an XML representation of the Entities and Relationships in your Database (the Storage Model, or SSDL), your application … Continue reading Why does he keep saying EDML instead of EDMX?
Pre-Generating Entity Framework Views with Embedded Metadata
Problem: When you are using embedded metadata in your Entity Framework project, the MSDN topic for How to: Pre-Generate Views to Improve Query Performance (Entity Framework) comes up short. Solution: This posting shows a simple (if tedious) technique for working with both embedded metadata and the pre-generated views. Step 1: Edit the XML of your … Continue reading Pre-Generating Entity Framework Views with Embedded Metadata