DbArithmeticExpression arguments must have a numeric common type

The Microsoft Visual Studio 2013 Entity Framework database query does not support the subtraction of two dates to calculate TimeSpan. For example the following statement will throw a runtime error: site.VisitFrequencySec < ((TimeSpan)(dtNow – site.LastVisitDate)).TotalSeconds) To solve the problem create a computed database column to calculate the difference between the dates and use the computed …

The underlying provider failed on Open

When you get the following error message in Microsoft Visual Studio 2013 check the inner exception. System.Data.Entity.Core.EntityException was unhandled   HResult=-2146233087   Message=The underlying provider failed on Open.   Source=EntityFramework The inner exception gives you detailed information on the real cause of the error. Most of the time the inner exception is the following: InnerException: …

The Entity Framework provider … could not be loaded

When you create a new Microsoft Visual Studio 2013 project that uses the Entity Framework you may get the following error message: The Entity Framework provider type ‘System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer’ registered in the application config file for the ADO.NET provider with invariant name ‘System.Data.SqlClient’ could not be loaded. Make sure that the assembly-qualified name is used …

How to migrate the Visual Studio 2013 user database to SQL Server 2008

When you create a new web application in Microsoft Visual Studio 2013 the user database it creates is version 706. SQL Server 2008 can only open databases up to version 663 or earlier. To migrate the new Visual Studio 2013 databases to SQL Server 2008 script the database tables and create them again in the …

Warning: Attempt to present … on … while a presentation is in progress!

There is a warning message in Xcode, the Apple iOS development environment that can have many different causes. Warning: Attempt to present … on … while a presentation is in progress! In my case Xcode displayed the warning because a button called the same view twice. When I deleted the action associated with the Touch …

Xcode app development troubleshooting

This post is a collection of common error messages you may receive during application development in Xcode. Error message Receiver ‘NSManagedObjectContext’ for class message is a forward declaration Solution Add #import <CoreData/CoreData.h> to the … – Prefix.pch Prefix header file in the Supporting Files folder  

QWERTY Hungarian keyboard on an English Macintosh keyboard

The English characters on the English and Hungarian keyboards are almost at the same place. The exceptions are the Z and Y keys, those are swapped. When you activate the Hungarian keyboard on a Mac with an English keyboard, the Z key will display Y and the Y key will display Z on the screen. …

Save an image in the Xcode iPhone simulator

When you are testing an app in the Xcode iOS Simulator sometimes you need to select an image in the photo library. To add images to Photos in the Xcode iOS Simulator Run you app in the iOS iPhone Simulator In the Hardware menu select Home to hide your app Open the Safari browser in …

How to lock your Macintosh and Windows computer

Always lock your computer to protect your secrets in the office while you are getting a cup of water from the kitchen. To lock a Macintosh computer Press the Control – Command – Q keys, or In the upper left corner click the Apple logo and select Lock Screen To lock a Windows computer In Windows, …

Microsoft Azure – Storage – Part 5 – Delete blobs with a .NET application

In the prior article of the Microsoft Azure storage series we have downloaded a file (blob) from the container. In this part we will add a method to delete a blob in the Azure storage container. Delete a blob  in the storage container Add the DeleteBlob method to the Azure_Helper Open the Azure_Helper.cs file in …