How to Add a New Table to an Existing Database via EF Code-First Migrations

The Situation: You have been using Entity Framework code-first migrations with an existing database. Making changes to an existing table, such as adding a new field, go smoothly, and the database is updated correctly when you run an "Update-database" command. However, when you create an entirely new entity in your model and run "Update-database", the … Continue reading How to Add a New Table to an Existing Database via EF Code-First Migrations

How to Enable and Use EF Code-First Migrations for Multiple Contexts

The Situation You want to use Entity Frameworks code-first migrations to push model changes to the database, but you have multiple┬ádatabases and contexts in your model. When you try to run Enable-Migrations for the second context, you get an error that looks like this: Migrations have already been enabled in project 'Project1'. To overwrite the … Continue reading How to Enable and Use EF Code-First Migrations for Multiple Contexts

How To Make a Column in an ASPxGridView ReadOnly for Editing but Enabled when Inserting a New Record

The Situation: You have a DevExpress ASPxGridView on your page with a column designated as "ReadOnly=true". This works great when you are editing an existing record -- it won't allow you to change that field, but when you try to insert a NEW record, you can't enter anything in the field. Note: I don't know … Continue reading How To Make a Column in an ASPxGridView ReadOnly for Editing but Enabled when Inserting a New Record

How to Pass Extra Parameters When Using AJAX Toolkit CascadingDropDowns with a Database

The Situation: You have set up your CascadingDropDowns as shown on the ASP.NET AJAX Control Toolkit documentation here, using a web service to retrieve and populate your dropdowns. However, in addition to the value of the first dropdown, you need to pass other parameters to the web service to be used in your query. A … Continue reading How to Pass Extra Parameters When Using AJAX Toolkit CascadingDropDowns with a Database

Should You Use 3rd-Party Controls and Frameworks? – Final Word?

I've done some more thinking about whether or not to use 3rd-party controls (see my original post, and this follow up) and I believe I have some "rules of thumb" that make sense now. My re-evaluation of my position on this has come because the EntitySpaces team announced that they would no longer continue the … Continue reading Should You Use 3rd-Party Controls and Frameworks? – Final Word?

How to Force an ASP.NET Page into IE Compatibility Mode (Even when Using Themes)

The Situation: You need to to use a control that is not fully compatible with the latest version of Internet Explorer (or you find that your page just doesn't function the same in the latest version). A Solution: The normal solution (and the one that nearly everyone can use UNLESS they are working with ASP.NET … Continue reading How to Force an ASP.NET Page into IE Compatibility Mode (Even when Using Themes)