Posts about Entity Framework

Using Non-static AutoMapper Configuration

December 22nd 2014 AutoMapper Entity Framework

AutoMapper is a popular object mapping library for .NET framework. By default its configuration is defined statically, but there is a way to do it non-statically and use per-instance dependencies inside the mapping code.

Mocking EF Context for Unit Testing WCF Services

January 6th 2014 Entity Framework WCF Unit Testing

Units tests are all about testing a specific unit of code without any external dependencies. This makes the tests faster and less fragile, since there are no out-of-process calls and all dependencies are under the test's control. Of course, it's not always easy to remove all external dependencies. One such example is a WCF service using entity framework for database access in its operations.

Course Review: Data Access with Entity Framework 5: Up & Running

September 30th 2012 Entity Framework Review Course

The course is as close to the experience of studying the topic at a university as possible, hence the name of the company. I can sincerely recommend it to anyone who needs to learn the basics of Entity Framework from scratch.

Book Review: Entity Framework 4.1: Expert's Cookbook

June 2nd 2012 Entity Framework Review Book

The book is a useful resource for anyone working with the latest versions of Entity Framework. Just don't start learning Entity Framework with it; some previous knowledge and experience is definitely recommended to make the most out of it.

DateTime Value Might Change When Saved to Database

DateTime can be a tricky data type to deal with. Not only is there daylight saving time and different time zones to keep in mind but also the range and precision can vary in different systems. You are probably already aware of some differences between .NET framework's DateTime structure in Transact-SQL's datetime data type. You might not be aware of the difference in precision between these two data types, though.

Adding Foreign Key Properties to an Existing Entity Framework Model

June 8th 2011 Entity Framework

One of the features introduced in Entity Framework 4 was support for foreign key properties in entity types. If you decided not to include them in your model when you originally created it, but want to add them at a later time, you'll have to do it by hand. I'll describe the steps on a simple example.