Private Deploy of EF with SQL CE 4.0 and Click Once

Recently I faced the problem with deploying an WPF application, which uses Entity Framework and Sql Server Compact 4.0 nuget packages. The application was deployed automatically by TFS Server as a Click Once  installer. The problem was that the setup did not download Sql Server package at client machine and application could not work. Apart from checking what is maybe wron…

By Mirek on (tags: Click Once, deployment, Entity Framework, Sql Ce, Sql Server Compact 4.0, categories: infrastructure)

Localized enums with Entity Framework Code-First 4.1 in WPF MVVM and ASP.NET MVC 3. Part 3)

Part 3. Displaying and binding localized names of enum values in ASP.NET MVC 3 application To display localized enums in ASP.NET MVC 3 application we use custom description attribute described in Part 2) and extension method to get the description for each enum value. The type converter is not useful here so we need another approach to achieve the goal. Let’s generate the editi…

By Mirek on (tags: ASP.NET MVC, Code First, Entity Framework, enums, lozalization, mvvm, WPF, categories: code)

Localized enums with Entity Framework Code-First 4.1 in WPF MVVM and ASP.NET MVC 3. Part 2)

  Part 2. Displaying localized names of enum values in WPF application To achieve the human readable enums I have performed following steps. For each language I want to support I have added a resource (.resx) file with key equals the string representation of the enum value.   Then we decorate our enum values with Display attribute as follows As a description we can pr…

By Mirek on (tags: ASP.NET MVC, Code First, Entity Framework, enums, localization, mvvm, WPF, categories: code)

Localized enums with Entity Framework Code-First 4.1 in WPF MVVM and ASP.NET MVC 3

In part 1) I would like to present the solution of using enum types with Entity Framework Code-First (EF CF later). Then in part 2) I would like to show how easily display these enums in WPF MVVM and in Part 3)  I will try to explain my approach for displaying and binding localized enums in ASP.NET MVC 3 application. EF CF approach is still developed and in version 4.1 it …

By Mirek on (tags: ASP.NET MVC, Code First, Entity Framework, enums, localization, mvvm, WPF, categories: code, web)

EF Code First and SqlServer Ce 4.0 – the simplest example ever.

Recently I needed to write a simple database application. I chose the Entity Framework Code First (Code Only) as a Object Relational Mapper (ORM) because its simplicity and quick development process. If you did not yet heard about EF Code First then this is a good place to start. Entity framework is a very powerful technology. It totally makes the whole dirty work which in the …

By Mirek on (tags: Code First, Entity Framework, SqlServer Ce 4.0, categories: code)

Abstract repository for direct EF, WCF and WCF Data Services connection with database.

In this article I would like to show you my implementation and approach for using abstract repository no matter if the client is connecting directly to the database using Entity Framework, over WCF service or WCF Data Services (WCFDS) service. 1. General explicit repository The goal here is to have common interface of the repository so the client application does not care about…

By Mirek on (tags: Code First, Entity Framework, WCF Data Services, categories: architecture, code)