Up Create, modify and delete code samples
DevForce 2010 Resource Center » Code samples » Create, modify and delete code samples » Code sample: Working with Entities (Desktop)

Code sample: Working with Entities (Desktop)

Last modified on August 15, 2012 17:21

A sample showing some of the things you can do with entities, written as unit tests.


Problem

You'd like to learn more about working with entities.  You'd also like to learn how to create and run unit tests.

Solution

The sample solution uses simple unit tests as the vehicle to show a number of ways to work with entities.  You'll learn to use the Visual Studio unit testing features, along with the IdeaBlade "test framework" which extends the Visual Studio test framework to make it easy to write unit tests targeting both desktop and Silverlight applications.

You'll learn to:
- use an injected base type
- explore the EntityManager API and work with entities in cache
- use the EntityAspect features of an entity
- transfer entities between EntityManagers using the EntityCacheState
- use property interceptors
- and more

To get started, open up the WorkingWithEntities project and take a look around.  To run the tests, just hit F5. 

IdeaBlade.TestFramework

You'll notice a supporting project in the solution called IdeaBlade.TestFramework.Desktop.  This contains the source code for the open source test framework under development.  The source code is licensed under the MIT open source license.  The test framework helps in writing unit tests targeting both the desktop and Silverlight applications.  This source code is provided "as is".

IdeaBlade.Extensions

Another supporting project whose source code is licensed under the MIT open source license.  The extensions are used by the test framework to provide a more fluent API.  This source code is provided "as is".

Created by DevForce on May 05, 2011 16:48

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade