db.Database.ExecuteSqlCommand("INSERT INTO [dbo].[CalendarEvent] (Length, Name) VALUES ('" + item.Length + "," + item.Name.Replace("'", "''") + "')");
I am attempting to add a line into a database table in C# Entity Framework but the execute statement keeps timing out before running. (Well i believe timing out as it just stops running.
I have tried both inserts seperatly (e.g. Name and length) and both work but when together it fails. I have also tried inserting one and then trying to update that line but fails in the same way.