Entity SQL User-Defined Functions in Entity Framework 4

May 28, 2009

Entity SQL User-Defined Functions in Entity Framework 4 Continuing the tour about the new features in EF4, the next stop is the new user-defined function capability of Entity SQL. Entity SQL User-Defined Functions There are two kinds of user-defined functions in EF4: Functions that are being defined as part of the conceptual model Functions that are being defined inline within a query You should use the Entity SQL user-defined functions when you ...

Calling Database Functions in LINQ to Entities in Entity Framework 4

May 23, 2009

Calling Database Functions in LINQ to Entities in Entity Framework 4 Another new feature in EF4 is  the new SqlFunctions class. In this post I’ll explain what is SqlFunctions class and how to use it in LINQ to Entities queries. The SqlFunctions Class The SqlFunctions is a new class in EF4. It contains methods that expose SQL Server functions to use inside your LINQ to Entities queries. When you use SqlFunctions methods the corresponding...

Model First in Entity Framework 4

Model First in Entity Framework 4 One of the new features of EF4 is the ability to generate a database and the SSDL and MSL that correspond to a provided model. In this feature we can start building our conceptual model first and then generate all the other parts of the EDM according to it. In this post I’ll introduce the model first feature. Generating a Database from a Given Conceptual Model One thing that was missing (in my opinion) in the first release of EF was the ability to start from a conceptual model and then to generate the other parts...

Pluralize or Singularize Generated Object Names Checkbox in Entity Framework 4

May 22, 2009

Pluralize or Singularize Generated Object Names Checkbox in Entity Framework 4 Creating entities with pluralize or singular object names was one of the missing features in EF V1.  Like LINQ to SQL now EF4 also has a feature that enables to pluralize or singularize the created objects automatically. You have the choice whether to enable it or not by a new checkbox in the EDM Wizard. The Pluralize or Singularize Generated Object Names Checkbox The first...

Complex Type Support in the EDM Designer in Entity Framework 4

Complex Type Support in the EDM Designer in Entity Framework 4 Yesterday I installed the new Visual Studio 2010 Beta 1. Since then I’m learning the new features of .NET 4 and in particularly Entity Framework 4 (or EF4). In the near future I’m going to write about the new features and enhancement made in EF4. In this post I’m revisiting a post I wrote in the past – Creating Complex Types...

Making Cross-Domain Ajax Requests for a Data Service Revisited

May 19, 2009

Making Cross-Domain Ajax Requests for a Data Service Revisited A month ago I released the post Making Cross-Domain Ajax Requests for a Data Service. The post is about a better solution to the problem. Problem Revisited In my previous post, I mentioned the problem of making a cross-domain Ajax requests to a service that isn’t located in the application domain. I also offered a solution of creating a cross-domain...

Setting an EntityReference Using an EntityKey in Entity Framework

May 15, 2009

Setting an EntityReference Using an EntityKey in Entity Framework Yesterday I got a question in my blog concerning the ability to set a reference to an entity in Entity Framework by using a foreign key that exists in my hand. The answer is described in this post. Setting an EntityReference Using an EntityKey Sometimes you want to set an EntityReference but you don’t have  that entity in the ObjectContext but you have its key. One solution for this problem is to load the entity and then to set the EntityReference. This will make an unwanted roundtrip to the database which we would...

What to be Expecting of Entity Framework in .NET 4

May 14, 2009

What to be Expecting of Entity Framework in .NET 4 The ADO.NET team started to release a series of posts that describe the primary scenarios and patterns they have been working on throughout the new release of Entity Framework in .NET 4.0. The primary scenarios and patterns you should be expecting: Development Approaches Model First development –  Enables the developer to start develop the...

My Next Month Courses Schedule

May 13, 2009

My Next Month Courses Schedule Next month I’m scheduled for the following courses: ADO.NET Entity Framework  Scheduled for 16.6 Advanced ASP.NET 3.5 Scheduled for 14.6 Design Patterns Scheduled for 11.6 If you want to participate in one of those courses or more details, you can contact E4D in the following ways: Contact Form in the this link Call Michal - 054-5612259 ...

The Benefits of Building a Layered Application

May 9, 2009

The Benefits of Building a Layered Application During the last two weeks I’m consulting at a customer that built a very simple application very badly. One of the problems that I found was the lack of layers separation which made the application very tangled. One example for that is the calling of stored procedures from UI user controls. I talked to the managers about that issue and explained the benefits of building a layered application. This post will explore those benefits. Layered Application Pattern Before talking about the benefits first we need to understand what is layered application pattern. The pattern is...
4 comments