View SqlServerAuditColumns.sql
CREATE TABLE TableName
(
TableNameId INT NOT NULL IDENTITY(1,1),
/* Other columns */
CreatedDate DATETIME2 NOT NULL CONSTRAINT [DF_TableName_CreatedDate] DEFAULT (GETDATE()),
CreatedBy VARCHAR(100) NOT NULL CONSTRAINT [DF_TableName_CreatedBy] DEFAULT (SUSER_SNAME()),
CreatedByHostName VARCHAR(100) NOT NULL CONSTRAINT [DF_TableName_CreatedByHostName] DEFAULT (HOST_NAME()),
ModifiedDate DATETIME2 NOT NULL CONSTRAINT [DF_TableName_ModifiedDate] DEFAULT (GETDATE()),
ModifiedBy VARCHAR(100) NOT NULL CONSTRAINT [DF_TableName_ModifiedBy] DEFAULT (SUSER_SNAME()),
ModifiedByHostName VARCHAR(100) NOT NULL CONSTRAINT [DF_TableName_ModifiedByHostName] DEFAULT (HOST_NAME())
View InsertWithOracleArrayBinding.cs
/// <summary>
/// Insert list into a database table using Oracle array binding (a type of bulk insert).
/// </summary>
/// <typeparam name="T">Type of data in list.</typeparam>
/// <param name="listOfData">List to insert.</param>
/// <param name="tableName">Table name.</param>
/// <returns>Rows affected.</returns>
public int Insert<T>(List<T> listOfData, string tableName) where T : class, new()
{
try
View NHibernateHelper.cs
using FluentNHibernate.Cfg;
using FluentNHibernate.Cfg.Db;
using NHibernate;
using NHibernate.Cfg;
/// <summary>
/// NHibernate Helper
/// </summary>
/// <remarks>
/// Because the SessionFactory creation is lazy-loaded, you technically never need to bootstrap NHibernate
View BooleanJsonConverter.cs
using System;
using Newtonsoft.Json;
namespace JsonConverters
{
/// <summary>
/// Handles converting JSON string values into a C# boolean data type.
/// </summary>
public class BooleanJsonConverter : JsonConverter
{
View OwinRequestExtensions.cs
/// <summary>
/// Owin Request extensions.
/// </summary>
public static class OwinRequestExtensions
{
/// <summary>
/// Gets the combined request parameters from the form body, query string, and request headers.
/// </summary>
/// <param name="request">Owin request.</param>
/// <returns>Dictionary of combined form body, query string, and request headers.</returns>
View VbaProject.OTM
Public Sub ShowCategoriesDialog()
Dim Mail As Object
Set Mail = Application.ActiveInspector.CurrentItem
Mail.ShowCategoriesDialog
End Sub
Public Sub AddAwaitingFeedbackCategory()
Dim Mail As Object
Set Mail = Application.ActiveInspector.CurrentItem
Mail.Categories = "Awaiting Feedback"
View SocialSecurityNumberGenerator.cs
using System;
namespace Helpers
{
/// <summary>
/// Social Security Number Generator.
/// </summary>
public static class SocialSecurityNumberGenerator
{
/// <summary>
View NameGenerator.cs
using System;
namespace Helpers
{
/// <summary>
/// Name Generator.
/// </summary>
public static class NameGenerator
{
// List of the top 40 boy and girl baby names of 2016
View ServiceInterceptorAttribute.cs
using System;
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace Utilities.Wcf.Interceptors
{
/// <summary>
View DataTableMappingTestsWithSlapperAutoMapper.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace Atcs.Core.Tests
{
[TestFixture]