Skip to content

Instantly share code, notes, and snippets.

Add this to the watch name:
((System.Data.Entity.Validation.DbEntityValidationException)$exception).EntityValidationErrors
DECLARE @SQL NVARCHAR(MAX) = N'';
SELECT @SQL += N'
ALTER TABLE ' + OBJECT_NAME(PARENT_OBJECT_ID) + ' DROP CONSTRAINT ' + OBJECT_NAME(OBJECT_ID) + ';'
FROM SYS.OBJECTS
WHERE TYPE_DESC LIKE '%CONSTRAINT' AND OBJECT_NAME(PARENT_OBJECT_ID) = 'Your_TABLE';
PRINT @SQL
@nkigen
nkigen / GooglePoints.cs
Created May 1, 2019 12:45 — forked from shinyzhu/GooglePoints.cs
Encode/Decode Polyline Algorithm Format in C#
/// <summary>
/// See https://developers.google.com/maps/documentation/utilities/polylinealgorithm
/// </summary>
public static class GooglePoints
{
/// <summary>
/// Decode google style polyline coordinates.
/// </summary>
/// <param name="encodedPoints"></param>
/// <returns></returns>