Browse by Tags

All Tags » Entity Data Model (EDM) » Entity Framework (EF) (RSS)

Self-Tracking entities: How to reduce exchange between client and server?

Self-Tracking entities are really great for N-Tiers scenarios but we have to be careful in order to reduce exchange between client and server. Imagine the following EDM: and the following scenario: using ( var context = new NorthwindClientContext ())...

EF and N-Tiers

Even if it’s really easier with Self-Tracking entities and EF4, a difficult point remains in N-Tiers scenarios. In a previous post , I explained how with T4, I can generate all my WCF service. Now, what about the client tiers? I explained how can I use...

Data oriented WCF service Agile with EF4 and a “sort of” provider LINQ

I use a different approach than Julie’s one for EF Agile development. Indeed, I use here Self-Tracking Entities and I massively use T4. The first step is to create a project DAL in which we will add an edmx. In my sample, I use Northwind DataBase with...

4 in 1: EF won’t fire DBAs, Velocity, SQL CLR and SQL Dependency

Imagine that we have a table Cars with a PK Id (nvarchar(8)) based on the following regex pattern [1-9][0-9]{1,2}[A-Z]{2,3}[0-9]{2}. The last two numbers are a region code. The increasement is done like this: 10AA[region], 11AA[region], …, 999AA[region...

ADO.NET Data Services Client context

One of the great points with EF is the eco-system around it. Even if it can be used without EF, I think that ADO .NET Data Services is one of the technologies in this eco-system. Indeed, using ADO.NET Data Services with EF implies almost no code to write...

Generate a WCF service from an edmx with T4 v2

I recently published a T4 template to generate a WCF service . I updated it to be able to load its relationships from an entity . When the template is written (what I’ve already done), it generates the WCF service for us (you just have to set the...

Entity Framework: the productivity way

One of the best points with Entity Framework is the developer productivity gain. If you associate EF with the T4 template code generation, this gain explodes. Imagine that we want a WCF service which exposes some data. For each entity type, you probably...

EF: Include with where clause

Several guys ask me if it’s possible to add a condition in the Include method and the answer is no. However you can do an equivalent like this: from cWithP in     ( from c in context.Categories      select new     ...

I need you!

I submitted one Birds of Feather session for the next Tech Ed in Berlin. My session submission depends on your votes . I think that you will find by yourselves which is my session Thanks by advance for your votes

ADO.NET EntityObject Generator: how to get the EntityType’s EntitySet and how to get EntitySet’s EntityTypes?

One of my customers wanted to know how to get all EntityTypes for an EntitySet in his T4 template based on the MS ADO.NET EntityObject Generator one. So I made a POC for him. What do I do? I change two classes included in the template (my changes are...

How to split your EDM v2?

After my previous post about it , my customer asks me the following question: how to get a complete graph (with categories, suppliers, products, order details, orders, customers and employees)? To realize it, we have to add “sort of” navigation...

ValidateOnBuild

The VS 2008 SP1 EDM designer doesn’t support all the mapping scenarii: Complex Types (supported with VS 2010 Beta 1) TPC Horizontal Entity Splitting I know another (free) designer which does . The most irritating thing with VS 2008 EDM designer (it isn...

How to split your EDM?

One of my customers wants to code an ERP. To make it, he wants to use EF. His DB has more than 600 tables with a lot of relationships between all of them. The problem is the fact that Entity Framework has some difficulties with big models. You should...

POCO: CreateObject and object initializer

When we work with POCO entities, queries return instances of proxy class which inherits entity types. Having some proxy instances allow us to use lazy loading. When we create an entity in order to attach it to the context, we can do a new on our entity...

Play with T4

One of the most important new thing with EF4 (EF v2) is POCO entities (no dependency with EF). Having independent classes is good but code generation also is. Indeed, if we want to change entities we don’t have to do the work twice (one for edmx...

EDM Designer: one more new feature

I just added a new feature in my EDM Designer : when an entity type isn't mapped or is only partially mapped (so we aren't able to use our edmx), I reduce its opacity: I do the same for Model Browser: I also do the same for associations:

EDM Designer: new feature

I added a new feature in my EDM Designer : the ability to see with context menu in which views the selected type (entity type or complex type) is present and the ability to navigate to this view. Or directly from the Model Browser

EDM Designer: new version

I just published my EDM Designer . After a lot of talks about it, particularly at the MVP summit, I changed my tasks priorities. With this new version, my EDM Designer doesn't manage SSDL functions (including Stored Procedure) and is not integrated...

EF and Culture

Imagine that you have a localizable DB like this: Products ProductID (PK) Name ProductDescriptions ProductID (PK, FK to Products) Culture (PK) Text Then we want only one public entity type: Product ProductID (Key) Name Description How to do this? First...

EDM Designer V0.9

My first EDM Designer version was a viewer. It's now a real designer . You can realize all the EDM mapping scenarii without writing xml yourself! ... except for Functions mapping (with Stored Procedures). I am very happy to see the interest of some...
More Posts Next page »