Skip to content

Instantly share code, notes, and snippets.

View Strandedpirate's full-sized avatar

Strandedpirate

View GitHub Profile
@Strandedpirate
Strandedpirate / DBContext Template
Last active March 23, 2022 17:33
Devart Entity Developer - Modified DBContext template that allows defaults for DateTime & Enums types. It also fixes a bug with many-to-many fluent api mapping. DateTime fields that are required by your model will be automatically set to DateTime.UtcNow. e.g. CreatedOn = DateTime.UtcNow; To set a value for an Enum there is a new extended propert…
<#
// Entity Framework DbContext template for Devart Entity Developer C# code generation.
// Copyright (c) 2008-2013 Devart. All rights reserved.
#>
<#@ template language="C#" #>
<#@ include file="Validation.tmpl" #>
<#@ assembly name="System.Core" #>
<#@ assembly name="System.Data.Entity" #>
<#@ assembly name="System.Data.Entity.Design" #>
<#@ assembly name="System.Xml" #>