Creating Indexed id's for a Collection Element in your MVC3 Helper

Creating an ASP.Net MVC3 helper is fairly straightforward. Generaly you create an extension method that extends the HtmlHelper class. In your method you need to do nothing more than to create create your HTML, perhaps using the TagBuilder class to help you along and return an MvcString.

Change Engine Driven SQL Database migrations for deployment

If you read my previous blog post you know that when using script based migrations we ran into several problems.

Our solution was to actually ship a database syncronization script engine rather than just a change script. As said, there are tools that can generate a change script by comparing two databases... one being the base version and one being the new version.

The trouble with script based migrations for production SQL server databases

The recent release of Enity Framework Migrations has gotten the developer community all a twitter. Seriously, people are tweeting about it.

Disclaimer: This post is not specifically about EF migrations. I actually haven't had time to dig into the scripts EF migrations generates but based my comments here on several other tools that create change scripts.

What is a migration?

Generally a migration is a code file that specifies changes to the database schemea. These changes are stored in code files and there is an executable that applies these to the database.

Asp.Net MVC3 Areas as Separate Projects

For those of us building large applications with multiple teams it is nice to be able to separate a solution into multiple projects and modularize it. Asp.Net MVC3 does have a built in way to separate out sections of your project using a feature called "Areas."

To create an "Area" in the MVC3 app there is a template. You right click on the solution and choose Add -> Area. A dialog comes up to allow you to name the area. Once you are done the template will create the Area in an "Areas" folder in the MVC project. If you don't already have an Areas folder it will be added.

RIA Services and EF4 in a multi-tennant app part two

If you read my previous blog post about the trials and tribulations of providing a connection string to the Entity Framework context in a multi-tenant SaaS app you will see that reflection magic was needed to get where I wanted to go.

Now for the next problem. I haven't solved this one, so please HELP.

The multi-tenant app implements the concept of what we call a portal. Each tenant has their own portal. Each customer is assigned a portalID when we set them up in the system.

RIA Services and Entity Framework 4 in a multi-tenant application

A multi-tenant application is generally defined as a single instance application that serves multiple tenants or user organizations from a single IIS application instance. Each tenant has their own set of users and company data. It would be very bad if a user from tenant A could see tenant B’s data.

There are several ways to implement such a system especially in regards to the database. The two basic schools of thought on the database is have one for the application that contains all tenant’s data on it partitioning the data using a tenant field on each table.

What's in an Entity Framework namespace?

That which we call a namespace by any other name would organize our class hierarchy.

When creating an Entity Framework model the add item wizard prompts you for two names.

The first is a text box on the "Choose your data connection page." It is at the bottom under a check box labeled "Save entity connection settings in App.config as:". The name defaults to your database name with "Entities" appended to it. If you uncheck the check box this text box grays out not allowing you to edit the value.

Eliminating the folder name from the added item's namespace

In Visual Studio when you add a folder to a solution, and then add an item into that folder the namespace on the generated item includes the folder name.

For example, if I have a project named Project1 with a folder named Folder1 and I right click on Folder1 to add a new class... the namespace created in that file is generated as:

namespace Project1.Folder1 {}

While I want to organize my code files inside my project... I really don't want the folder hierarchy to build a namespace hierarchy. I assume for some people they do this, or want to do this.

Upgrading ASP.Net 2.0 to ASP.Net 4.0

Today I upgraded our ASP.Net 2.0 project from Visual Studio 2008 to Visual Studio 2010 targeting .Net 4.0.

I ran into some issues and just wanted to list them here so others might be forewarned.

  1. Our solution has 5 web applications and many other class library projects. When the upgrade "wizard" was running it asked me with a prompt dialog if I wanted the web application project to target .Net 4.0 instead of .Net 2.0. There is also a check box on that dialog "Do this for all other web projects" which I checked.

Blog Updated

Today I upgraded my web site to Drupal 6.16 and all my out dated modules as needed. This takes me to long cause I don't do it very often. So I have to remind myself where I have everything stored.

I would put it here, but I think that would be TMI. ;)

I guess if you follow my blog you might wonder where I've been. Well, I'm still here plugging away. But, I'm not very verbose. If I find something exciting and worthy of sharing I will blog it.

However, I am going to make an effort to blog more. I have been concerned that if I don't provide value that it's not worth sharing.

Syndicate content