This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace JsonConvertNullToEmpty | |
{ | |
public class Main | |
{ | |
public Child First | |
{ | |
get; | |
set; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ConsoleApplication1 | |
{ | |
public class Context | |
{ | |
public IList<Product> Products { get; set; } | |
public IList<Company> Companies { get; set; } | |
} | |
public class Product | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using NHibernate.Cfg; | |
using NHibernate.Dialect; | |
using NHibernate.Driver; | |
using NHibernate.Mapping.ByCode; | |
using NHibernate.Mapping.ByCode.Conformist; | |
using NHibernate.Tool.hbm2ddl; | |
namespace ConsoleApplication1 | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- NOTE | |
-- Must update dbName & Folder | |
declare @dbName nvarchar(150); | |
declare @folder nvarchar(100); | |
set @dbName = 'TestDB'; | |
set @folder = 'D:\Mega\Wip\SQL\TestDB\Backup\'; | |
declare @path nvarchar(255); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare @dbName varchar(255); | |
set @dbName = 'TestDB'; | |
SELECT m.physical_device_name, | |
b.backup_start_date, | |
b.backup_finish_date, | |
b.type, | |
b.backup_size/1024/1024 AS BackupSizeMB, | |
b.compressed_backup_size/1024/1024 as CompressedBackupSizeMB |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
ja.job_id, | |
j.name AS job_name, | |
ja.start_execution_date, | |
ISNULL(last_executed_step_id,0)+1 AS current_executed_step_id, | |
Js.step_name | |
FROM msdb.dbo.sysjobactivity ja | |
LEFT JOIN msdb.dbo.sysjobhistory jh | |
ON ja.job_history_id = jh.instance_id | |
JOIN msdb.dbo.sysjobs j |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin tran | |
declare @c uniqueidentifier | |
while(1=1) | |
begin | |
select top 1 @c = conversation_handle from dto.YourQueueName | |
if (@@ROWCOUNT = 0) | |
break | |
end conversation @c with cleanup | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT name, create_date, modify_date | |
FROM sys.objects | |
WHERE type = 'P' | |
ORDER BY modify_date desc, create_date desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
# 7Zip - https://chocolatey.org/packages/7zip | |
choco install 7zip -y | |
# Notepad++ - https://chocolatey.org/packages/notepadplusplus.install | |
choco install notepadplusplus.install -y | |
# TreeSize Free https://chocolatey.org/packages/treesizefree | |
choco install treesizefree -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
# Install SQL Server 2014 Management Studio | |
choco install mssqlservermanagementstudio2014express -y --version 12.2.5000.20170905 | |
# Install SQL Server 2014 | |
choco install mssqlserver2014express -y --version 12.2.5000.20170905 |
OlderNewer