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| 4 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...

Entity Framework 4 Persistence-Ignorance First Look

by mosessaur| 20 May 2009| 6 Comments

Introduction:

From the moment I put my hands on Visual Studio.Net 2010 Beta 1 and I’m targeting EF4 –Entity Framework 4- as I was very excited to checkout the new cool feature of it.

Here I am going to highlight my first look at Persistence-Ignorance support in EF4.

More...

Introducing DataLoadOptions for Entity Framework ObjectContext

by mosessaur| 16 May 2009| 2 Comments

On my previous post “” I was suggesting another way to define eager loading for Entity Framework. In this post I will introduce my DataLoadOptions for Entity Framework ObjectContext.

The beginning:

Actually Eager and Lazy loading on Entity Framework is not that much fun like in Linq to Sql. However this is going to be improved in EF4.

Here I will focus on eager loading and my slight improvement to define eager loading in Entity Framework. When I start to think about, I wanted something simple and pretty close to the way Linq to Sql work. In Linq to Sql it is the DataLoadOptions that helps you define eager loading before start using Linq to Sql DataContext.

So I started to explore the DataLoadOptions code using reflector, to better understand how it works and how it helps Linq to Sql define eager loading.

More...

Enterprise Library 4.1 Hands-on-Labs

by mosessaur| 02 April 2009| 1 Comments

Last month (March 2009)  . Earlier this year there were HOLs released for , now a full HOLs is released for the entire Enterprise Library.

Hands-on Labs walk you through the key usage scenarios of the application blocks in in various application contexts. You can practice the labs from start to finish or you can use the starter solutions provided to complete only the labs you want to, in the order you prefer.

Domain Driven Design & Test Driven Development\Design using Entity Framework, Part 2.A Unit Testing Entities With Moq 3

by mosessaur| 24 March 2009| 5 Comments

I had about DDD & TDD with Entity Framework that you might need to return to them before you proceed with this post. To summarize these posts, I was trying to build testable Models that is based on EF. But EF doesn't support Persistence Ignorance in its first version which make testing it in most cases require a database connection where you can test you code against it. My target was to build a testable models based on EF and that is independent of any underlying data source.

Introduction, Domain Model Review:

EntityModel-DDD

More...

Book Review: ASP.NET 3.5 Application Architecture and Design

by mosessaur| 14 March 2009| 6 Comments

Information about the book:

Book Title: ASP.NET 3.5 Application Architecture and Design
Book's Page: http://www.packtpub.com/application-architecture-and-design-for-asp-.net-3.5/book
Book Cover
ASP.NET3.5ApplicationArchitectureandDesign

Chapters: 9
Publisher: PACKT Publishing
Author: Vivek Thakur

Introduction:

Microsoft ASP.NET has quickly evolved to become one of the most famous platforms for developing web-based solutions. Since its first release with .Net 1.0, Microsoft has continuously added many out-of-the-box features and components, making web development easier for the end developer. As ASP.NET is part of the whole .Net Framework, it is gaining benefits of all features and technologies provided by the .Net Framework itself. With the introduction of LINQ, MS AJAX, WCF, WPF, and a lot of exciting new tools, the .NET framework has not only grown large but also flexible, in terms of the choices and options being offered to the developers.

More...

Domain Driven Design & Test Driven Design\Development with Entity Framework Part 1.b Integration Testing for ObjectContext

by mosessaur| 23 February 2009| 2 Comments

I decided to provide some integration testing before proceeding as a proof of concept. In integration testing I will connect to the database and perform unit testing while connecting to the database.\

This unit test is almost identical to the one in my previous post. Except here I am testing the results that is coming out from EF and Database.

My target is to test IDataContext Implemented methods in NorthwindDataContext. Find below the Integration unit testing class. More...

Domain Driven Design & Test Driven Development\Design with Entity Framework Part 1.b, Review

by mosessaur| 21 February 2009| 4 Comments

In return to my previous posts about DDD & TDD with EF. I discovered few catches in my design that I wished to high light and discuss in this post. To summarize my take here are the head lines:

  • What is the Responsibility of ObjectContext in EF?
  • What is the Responsibilities of Repositories and whether they should be coupled with EF or not?

I come up with this post after few discussions through e-mail with Davy Landman.

More...

Domain Driven Design & Test Driven Development\Design with Entity Framework, Part 1.a Refactoring & Unit Testing

by mosessaur| 11 February 2009| 4 Comments

In I talked about building domain model for Northwind using Entity Framework. I used the generated ObjectContext class which is NorthwindDataContext as the basic Data Access Layer Helper. But my NorthwindDataContext is implementing custom interface I created in order to be able to make my Data Access Layer testable as well as to be independent from EF.

My target is to achieve decoupling between EF and all layers above it. This include Repository classes. This might not be of a big benefit to everyone, because my repositories implementation will still dependent on IDataContext. But for me it will help to do TDD more smoothly regardless of my underlying data access layer. Beside it might allow me in future to be able to switch from EF to LINQ to SQL and just implement my IDataContext interface for LINQ to SQL.

Source code is attached to this post, feel free to download it and explore the code

More...

Domain Driven Design & Test Driven Design With Entity Framework, Part 1 Building Domain Object Model

by mosessaur| 05 February 2009| 10 Comments

Introduction:

In my previous post I talked about definitions of TDD as specified in different sources. Here in this post I'll walk-through applied Domain Driven Design & Test Driven Design on Entity Framework.

I assume that you already know Entity Framework and how to create your entity data modes using Visual Studio.Net 2008 with SP1.

Domain Driven Design & Entity Framework:

To simplify things, I am using Northwind database. Basically I'll expose 3 tables in this database, Categories, Products & Suppliers. Those will be my domain objects as Category,Product and Supplier classes.

Each Category object might contain one or more items of Product. Same thing for Supplier object as it might provide one or more items of Product. That means Product object must have a Supplier and a Category. I defined those criteria for my Domain Objects.

More...

First Steps toward Test Driven Design\Development

by mosessaur| 28 January 2009| 9 Comments

Introduction:

I'm totally new to TDD world. I saw many sample open source projects that based on TDD and DDD but I explored only 2 of them, the MVC Storefront and Kigg (see it live). I was very lucky actually to go deep with Kigg source code and I found it one of the most clean and testable code I ever seen. With out single line of comment you can understand what this code is doing. Special thanks to Kazi Mansur Rashid every member of this project for such great work.

Quotes:

This encourage me to start practically learning TDD and apply it. So I started to search about TDD. In the following few lines I am going to list few quotes I caught from different sources:

More...

MosesOfEgypt new Theme by JankoAtWrapSpeed

by mosessaur| 20 January 2009| 13 Comments

Before completing one year of running this blog, I celebrate the last month of the first year of this blog by deploying my new theme create by JankoAtWrapSpeed.com. Thank you Janko.

Actually Janko created a lovely themes pack for BlogEngine.Net. He branded MosesOfEgypt.Net with his piece art theme. I like the dark theme especially that man standing front of the moon, I think Janko has a vision about it Laughing

Any way I hope you all like the new theme as I do.

Username Availability Validator AJAX Control, Release Demo

by mosessaur| 04 January 2009| 13 Comments

Back in September last year (2008), I posted a demo about Username Availability Validator Control. This control developed by the community on a contest initiated by Dave Ward on August 2008 as I remember. At that time the control was in beta.

On October 2008 the control was released to public on its first version. And finally I wrote a a very simple documentation on the project Wiki.

In this post I am going to update my previous demo as well as provide new feature on the control which is SuccessMessage property to be displayed if the Username is available. This update is not available so far on project at CodePlex. This is a private update which I provided on this post only. [View Demo]

More...