Asynchronous Controllers Calls to Save Data in ASP.NET MVC 3

On a few occasions I wondered if it is possible to simulate Silverlight Save behavior in ASP.NET MVC.  What I mean is to asynchronously call a service from an edit form, asynchronously process the results, and update view based on saved data.  This process is a bit more complicated in ASP.NET MVC because we have …

Continue reading ‘Asynchronous Controllers Calls to Save Data in ASP.NET MVC 3’ »

More on Asynchronous Processing in ASP.NET MVC 3

In this post I would like to cover a couple of asynchronous patterns that are available in ASP.NET MVC and jQuery as it is used in MVC. In all my previous examples related to MVC 3.0 I used regular controller class that is automatically created for a developer when New Item –> Controller is chosen …

Continue reading ‘More on Asynchronous Processing in ASP.NET MVC 3’ »

Localizing / Customizing Entity Framework and ASP.NET MVC 3

In most demos that you see that involve entity framework code first and ASP.NET MVC 3, localization is not mentioned.  What if you want to make your data multi-language friendly?  Here is a simple example: I want to have title column to be at most 30 characters in my entity:     [StringLength(30)]     public string Title …

Continue reading ‘Localizing / Customizing Entity Framework and ASP.NET MVC 3’ »

More on Repository Pattern with Entity Framework Code First

I got a comment on my first post on this pattern that pointed out unnecessary use of reflection as well as a way to make my sample cleaner.  I took an opportunity to go ahead and update the sample.  I added a bit of new functionality to illustrate how you can also pass in where …

Continue reading ‘More on Repository Pattern with Entity Framework Code First’ »

Global Conventions in Entity Framework Code First v 4.1

In my previous post I showed how to implement custom conventions in absence of the same feature in Entity Framework 4.1.  Today I am going to expand on the same topic and try to create some global contentions. Let me elaborate a bit on a problem I am trying to resolve.  For example, if I …

Continue reading ‘Global Conventions in Entity Framework Code First v 4.1’ »

Custom Conventions in Entity Framework Code First v 4.1

As you know, in preview version of Entity Framework code first existed concept of custom pluggable conventions that would allow the developer to avoid using large amounts of code in OnModelCreating method.  Typically, if one would like to keep entity classes free of entity framework references and possibly of Data Annotations references, fluent API available …

Continue reading ‘Custom Conventions in Entity Framework Code First v 4.1’ »

Entity Framework Code First Caching

As I was playing around with Entity Framework code first and ASP.NET MVC, it became pretty obvious that caching of some of the EF query results would be pretty handy.  For example, if you look at my post that includes a simple ASP.NET MVC blogging application, you could see that I have to keep fetching …

Continue reading ‘Entity Framework Code First Caching’ »

Repository Pattern with Entity Framework

Repository pattern is a popular architecture pattern that is used to create data access code / layer for an application.  Basic principal behind the pattern is that business object in your application never talks to database directly, but instead talks to repository that takes POCO classes and also returns POCO classes as results of a …

Continue reading ‘Repository Pattern with Entity Framework’ »

Working with Data on Windows Phone 7 – Part 2

In this part I am going to use WCF Data Services (formerly known as project Astoria and ADO.NET Data Services) to accomplish the same couple of tasks I did in WCF custom service.  I am going to get a list of people and add a person. I will use exact same project as I did …

Continue reading ‘Working with Data on Windows Phone 7 – Part 2’ »