Performing commands on all tables in SQL Server database using the sp_MSforeachtable store procedure

From time to time I have a need to do an operation such as dropping all records or disabling all … Continue reading Performing commands on all tables in SQL Server database using the sp_MSforeachtable store procedure

Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details

You may see this exception when doing a DbContext.SaveChanges() call. You then may go drilling into the exception details to … Continue reading Validation failed for one or more entities. See ‘EntityValidationErrors’ property for more details

MVC Dropdownlistfor defaulting to previously selected value when using a single SelectListItem List

Watch out for this one. If you have created a single list of SelectListItems and use this viewModel property to populate … Continue reading MVC Dropdownlistfor defaulting to previously selected value when using a single SelectListItem List