Category Archives: Entity Framework

IQueryable vs IEnumerable vs IHaveHeadache

Yes.. this ist just another blog post about IEnumerable and IQueryable. But the topic is quite important and I think it worth discussing about both approaches. Recently I had a discussion with a software architect about the implementation of the repository pattern. The question was: Should the repository return IEnumerable or IQueryable? So let’s do… Read More »

Entity Framework and Expression Queries

In my current project I had to generate a Entity Framework query based on some search criterias defined in a dictionary. The structure of the dictionary was similar to this example here: var searchCriteria = new Dictionary<string, List<string>>() { { "FirstName", new List<string> { "Darko", "NoName" } }, { "LastName", new List<string> { "Micic", "Müller",… Read More »

Entity Framework Code First And SQL Server DACPAC

Entity Framework Code First Migrations allows you to handle changes in your model (C#) by generating “migration scripts” for keeping the DB in sync with the code. It works very well. But I never used it in a project with more than 1 developer. I think we could run in different problems. And managing all… Read More »

Entity Framework ‘Code First’ Approach and Domain-Driven Design

With the Code First approach we can create clean entities without any EF specific code. After the first demo, I saw that you have to deal with the IDbSet interface, which is placed in the Entity Framework library. When you place the entities in your business dll you have to reference the EF library. This… Read More »

SQL Server and “M”

I found an interesting link about the feature of SQL Server: Microsoft will release a new language called “M”. Link: Update on SQL Server Modeling CTP (Repository/Modeling Services, “Quadrant” and “M”)