Getting Started with Entity Framework 4.0 Screencast Recorded session from Cairo Code Camp - Part 4

by mosessaur| 07 August 2010| 3 Comments

About Part 4

Fourth part is about 10 min in length. Covers how to implement table per hierarchy inheritance model (TPH) with Entity Framework 4.0

More...

Getting Started with Entity Framework 4.0 Screencast Recorded session from Cairo Code Camp - Part 3

by mosessaur| 10 July 2010| 3 Comments

About Part 3

Third part is about 8:20 min in length. Covers how to use stored procedures with EF4 to do CRUD operations on the database. The demo shows how to do mapping to existing stored procedures. The Demo also shows how to use IntilleTrace to view executed statements made by EF object services.

More...

Getting Started with Entity Framework 4.0 Screencast Recorded session from Cairo Code Camp - Part 2

by mosessaur| 18 June 2010| 2 Comments

About Part 2

Second part is about 6:30 min in length. Covers Object Services and how to do CRUD operations using EF 4.0 object services. The demo explores EF change tracking capabilities. The demo also shows how to map return result of a stored procedure to existing entity in your EDM.

More...

Getting Started with Entity Framework 4.0 Screencast Recorded session from Cairo Code Camp - Part 1

by mosessaur| 15 June 2010| 4 Comments

Introduction

I finally decided not to wait till I finish the whole recording which it seems is going to take some good time. And so I started to split this recording session/screencast into multiple parts and post them.

About Part 1

First part is about 10 min in length. And is an introduction to Entity Framework 4.0 with brief about its short history. This part also include a demo about new vs2010 designer enhancements for EF4. Also the screencast shows how to do a refactor to complex type using EDM designer.

More...

Mapping Conceptual Model Function to Complex Type in Entity Framework 4.0

by mosessaur| 07 April 2010| 8 Comments

Introduction

You might hear of KiGG, the open source project that is currently live as http://dotnetshoutout.com. I wanted to expose part of KiGG data as an OData Service for read only. But I figured out that exposing raw KiGG schema might not be useful. So I had to choose between 2 options that were up to my mind:

  • Build some views on the physical store -database-. Create a new entity data model for those views and use the new data model context for DataServiceContext.
  • Use Entity Framework 4.0 conceptual model function feature with complex types to simulate views. It’s like building views on the conceptual model itself and not the store model.

I picked the 2nd option. The sample downloadable sample is available at the end of this post.

More...

Getting Started with Entity Framework 4.0 – Session given at Cairo CodeCamp 2010

by mosessaur| 05 March 2010| 1 Comments

At the end of last month (27-28 Feb 2010) I got the opportunity to participate in Cairo CodeCamp event by giving a session about “Getting Started with Entity Framework 4.0”.

Here is summary of my session –taken from Cairo CodeCamp web site-:

An introduction to Entity Framework 4.0 that will be shipped as part of .Net 4.0 and VS.Net 2010. Exploring new and enhanced features of Entity Framework 4.0. Walking through building entity data model using VS.Net 2010 and Entity Framework 4.0. Examining new design features in Entity Framework introducing Persistence Ignorance.

I uploaded my session and demos. You can download them now. I hope you’ll enjoy the demos and presentation. Click here to download.

All sessions should be posted soon to Cairo CodeCamp web site. Keep tracked for updates.

I have a plan to record my session as screen cast in English and post it here as well. But can’t promise when this will be as I have many other things I committed to recently.

Keep tuned anyway you might find interesting stuff posted soon.

KiGG Design And Architecture – Part 4 Inside Infrastructure

by mosessaur| 30 January 2010| 5 Comments

Introduction

This is part 4 of this series which I don’t know when it will ends :o). In part 3 I started to to explore the Core of KiGG. In this part we are still inside the core, but we are going further deep to have a look inside the infrastructure.

I’m going to talk about infrastructure for the next couple of posts or maybe more. Because actually it contains the heart of KiGG.

More...

Entity Framework Podcast and Unit Testing Video

by mosessaur| 22 December 2009| 2 Comments

Just done with my first video about Unit Testing Entity Framework with TypeMock Isolator. It is my very first video actually made in the community.

Also last October, I was interviewed by DotNetArabi on Entity Framework. That was my first Podcast too. The Podcast was in Arabic.

Here are links for both:

Hope you’ll enjoy it.

Entity Framework 4.0 Beta 1 Sneak Peak Session at DotNetWork User Group in Cairo, Egypt

by mosessaur| 05 October 2009| 4 Comments

Introduction

Again I was honored to present a talk on first Egyptian .Net user group “DotNetWork”. My previous session -the first- was a joint session with Bishoy Ghaly about Entity Framework v1 in .Net 3.5 SP1. This session was about Entity Framework 4.0.

After we introduced Entity Framework to Egyptian community, I decided to give them a sneak peak at the new version of it. Comparing between both versions, showing the evolution and the massive enhancement made on the new version. The session covered the early CTP 1 of Entity Framework 4.0 Beta 1 that is released last June.

Presentation is available to download here.

More...

Introducing Entity Framework Unit Testing with TypeMock Isolator

by mosessaur| 06 September 2009| 16 Comments

Introduction

One of the challenging things with current version of Entity Framework, its leakage of testability. Which means when you build an application or module (e.g. Repositories) that depends on entity framework, it will be very hard to unit test your code isolated from Entity Framework. This might lead to conduct Integration Testing which will require a connection and interaction with underlying data store (database).

You might think of using to mock or fake Entity Framework data store dependent calls. But sadly and Rhino Mock mocking frameworks do not support this. And you’ll end up hitting the wall. Both frameworks are great useful and I personally use for a while now and very happy with it. But no one can deny limitations when exist.

And personally I was able to overcome the limitation of the testability of Entity Framework while I was working in  Entity Framework based models and repositories. But done that through unnecessary code refactoring and wrappers around none mockable classes such as sealed class EntityCollection<T>.

Finding a solution with TypeMock Isolator

In fact there is a solution, that will save you lots of workarounds and unnecessary code refactoring. You just need a full isolation framework. Isolator provides this capability. It allows to mock sealed classes and classes that have private constructors, static methods, and much more.

makes it easy to simulate and break the dependencies of any object in your existing code. In that way, it doesn’t force you to think about how your design might need to change. –The Art of Unit Testing book page 132-

So, TypeMock isolator is a perfect mate for testing code that has dependencies on Entity Framework as how I am going to show now.

More...

Multiple database support with Entity Framework

by mosessaur| 18 August 2009| 18 Comments

Introduction

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I’m going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Entity Framework providers

Entity Framework is database independent. Each database provider could have its own Entity Framework provider. Currently there are several database provider who support the current version of Entity Framework that is released with .Net 3.5 SP1.

A list of Entity Framework providers can be found .

Entity Framework multiple database support sample

In this post, I am going to demonstrate a sample application (based on northwind database) that is going to support both SQL Server database engine and MySQL database engine.

More...

Introducing Entity Framework v1 in DotNetWork User Group in Cairo Egypt

by mosessaur| 18 July 2009| 4 Comments

Bishoy Ghaly & me made an introductory presentation about Entity Framework for the first time in DotNetWork User Group in Cairo, Egypt –Saturday 18th July-

After a survey we made in June we discovered that an introductory session to Entity Framework is a must. So we prepared this 3 hours session -level 100- to introduce Entity Framework to the audiences.

More...

KiGG support for Entity Framework and MySQL

by mosessaur| 07 July 2009| 4 Comments

Introduction

is a Web 2.0 style social news web application developed in Microsoft supported technologies. It is an open source project hosted on CodePlex. It is live and running as DotNetShoutout.com.

KiGG and Entity Framework

On May 2009, I’ve completed the implementation of Entity Framework support on KiGG. KiGG design was very flexible to plug another repository implementation other than LINQ to SQL. So basically now KiGG comes with 2 repository flavours, LINQ to SQL and Entity Framework.

Read about .

More...

Microsoft ADO.NET Entity Framework Feature CTP 1 Post Beta 1

by mosessaur| 30 June 2009| 0 Comments

Microsoft ADO.Net team released (this month June 2009) a set of features that build on top of Entity Framework 4.0 Beta 1
The features included in this CTP are :

  1. that allows you to write Entity Data Model based applications without requiring external artifacts

CTP can be downloaded here

Enjoy it.

Entity Framework minimum permission considerations

by mosessaur| 21 May 2009| 7 Comments

Introduction

While working with Entity Framework v1 during implementation of Entity Framework repositories, I decided to test for partial trust environment. Particularly Medium Trust support. Will not go through whether currently support medium trust or not in it current or upcoming version, but I will go through one of the reasons why currently might not support medium trust. It is because MY implementation of Entity Framework. Note that I am saying MY, because Entity Framework application can run on medium trust.

More...