Monday, July 29, 2013
DbEntityValidationException - Entity framework validation error handling
Friday, July 26, 2013
Unable to update the EntitySet 'EntityName' because it has a DefiningQuery and no element exists in the element to support the current operation.
In my case the problem was incorrect Entity Key setting on my entity in EF Model plus forgetting to set primary key in DB table. After setting primary key for the table which entity pointing too, I needed to update the model and open the EF model and manualy set Entity Key for primary key related member in the entity and clearing Entity Key setting for unnecessary entity members. Then rebuild, it worked. The reason was EF created a compound key made of all non nullable entity members which I had to reset them all.
It was my case but there are other possibilities for this error which already discussed if you search on Internet (Google or bing it)Unable to update the EntitySet 'EntityName' because it has a DefiningQuery and no
Wednesday, July 17, 2013
SQL - Record count for all tables in a DB
SQL - Record count for all tables in a DB
Tuesday, July 16, 2013
How to add a digital ID to adobe reader (.pfx exported certificate file)
How to add a digital ID to adobe reader (.pfx exported certificate file)
Sunday, April 14, 2013
Microsoft Security Essentials - a must have security pieces to protect your system
Saved me from Sirefef.gen!C which is a computer virus that intercepts secure web connections and can steal passwords and other sensitive data. Chrome recognises this virus, but it affects all software on the computer. Other browsers and software may continue to work but they are also affected and rendered insecure.
Microsoft Security Essentials can reportedly remove this virus. When the virus is removed, the warnings in Chrome will stop.
Microsoft Security Essentials - a must have security pieces to protect your system
Thursday, November 1, 2012
SQL - EDMPASS Nov. 20th, 2012
SQL - EDMPASS Nov. 20th, 2012
Thursday, October 25, 2012
TSQL - Partial Duplicate Indexes
TSQL - Partial Duplicate Indexes
Wednesday, October 24, 2012
TSQL - Exact Duplicate Indexes
TSQL - Exact Duplicate Indexes
Saturday, October 15, 2011
Database table indexes with type and size
SELECT
sysSchma.name AS SchemaName
, sysObj.name AS TableName
, sysIndx.name AS IndexName
, sysIndx.type_desc AS IndexType
, sysPartStat.used_page_count * 8 AS IndexSizeKB
, CAST(sysPartStat.used_page_count * 8 / 1024.00 AS Decimal(10,3))
AS IndexSizeMB
FROM sys.dm_db_partition_stats AS sysPartStat
INNER JOIN sys.indexes AS sysIndx
ON sysPartStat.[object_id] = sysIndx.[object_id]
AND sysPartStat.index_id = sysIndx.index_id
AND sysIndx.type_desc <> 'HEAP'
INNER JOIN sys.objects AS sysObj
ON sysObj.[object_id] = sysPartStat.[object_id]
INNER JOIN sys.schemas AS sysSchma
ON sysObj.[schema_id] = sysSchma.[schema_id]
AND sysSchma.name <> 'SYS'
-- WHERE partition_stats.[object_id] = object_id('dbo.TableName')
ORDER BY SchemaName, TableName, IndexName, IndexType
Database table indexes with type and size
Monday, September 5, 2011
Dumpbin.exe - a tool to provide info about DLLs (x86 or x64)

- SET PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE;
- SET PATH=%PATH%;C:\Program Files\Microsoft Visual Studio 10.0\VC\bin;C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE;
Dumpbin.exe - a tool to provide info about DLLs (x86 or x64)