I tried this very basic code on a very basic table that contains no DATETIME 
field.

var Obj = context.MediaCategories.FirstOrDefault();
Obj.Folder = "test";
context.SaveChanges();

The table has this format
- MediaCategoryId GUID Primary Key
- MediaTypeId INT
- Name NVARCHAR
- Folder NVARCHAR

I can't get any more basic than that!

The generated query is this


UPDATE [MediaCategories]
SET [Folder] = @p0
WHERE ([MediaCategoryId] = @p1);

-- @p0: 'test' (Type = String)

-- @p1: '7320f1c6-1834-4c81-a16f-12b733d76038' (Type = Guid)

-- Executing at 29/05/2015 9:11:54 PM -05:00

-- Completed in 0 ms with result: 0


If I run this query manually, it works.


Etienne

Reply via email to