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
static class ModelBuilderExtensions | |
{ | |
public static void UsePostgresConventions(this ModelBuilder modelBuilder) | |
{ | |
foreach (var entity in modelBuilder.Model.GetEntityTypes()) | |
{ | |
// Replace table names | |
entity.Relational().TableName = entity.Relational().TableName.ToSnakeCase(); | |
// Replace column names |
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
# first folder contains the csproj you want to package | |
# second folder is the relative path to your nuget feed folder from the library folder | |
dotnet pack -c Release ./src/Trail.Common -o ./../../../nuget-feed | |
# switch to feed folder | |
cd ../nuget-feed | |
# add new package | |
git add -A |
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
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | |
<s:Boolean x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=C8C772595BBC034583354C481049638F/@KeyIndexDefined">True</s:Boolean> | |
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=C8C772595BBC034583354C481049638F/Description/@EntryValue">NUnit Test Fixture</s:String> | |
<s:String x:Key="/Default/PatternsAndTemplates/LiveTemplates/Template/=C8C772595BBC034583354C481049638F/Text/@EntryValue">$HEADER$namespace $NAMESPACE$
 | |
{
 | |
[NUnit.Framework.TestFixture]
 | |
public class $CLASS$
 | |
{
 | |

 | |
[NUnit.Framework.SetUp]
 |
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
[TestFixture] | |
[Category("DatabaseSchema")] | |
[Explicit] | |
//nunit-console "TestAssembly.dll" /include:DatabaseSchema /framework=4.0.30319 | |
public class SchemaCreator | |
{ | |
[Test] | |
public void CreateSchemaScript() | |
{ | |
ISchemaManager schemaManager = new SchemaManager(new ConfigurationBuilder().BuildConfiguration()); |
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
public class DefaultInstaller : IWindsorInstaller | |
{ | |
public void Install(IWindsorContainer container, IConfigurationStore store) | |
{ | |
container.Register(Classes.FromThisAssembly().IncludeNonPublicTypes().Pick().WithServiceAllInterfaces().LifestyleSingleton()); | |
container.Register(Component.For<ILogger>().Instance(new LoggerAdapter(LogManager.GetCurrentClassLogger()))); | |
} | |
} |
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
public class MvcApplication : HttpApplication | |
{ | |
protected void Application_Start() | |
{ | |
WindsorBootstrapper.CreateBootstrapContainer(); | |
AreaRegistration.RegisterAllAreas(); | |
RouteConfig.RegisterRoutes(RouteTable.Routes); | |
} | |
protected void Application_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
<?xml version="1.0" encoding="utf-8" ?> | |
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<targets> | |
<target name="logInfoToFile" xsi:type="File" fileName="${basedir}/../Logs/${shortdate}/InfoLog.txt" layout="${date:format=HH\:mm\:ss\:fff}|${message}" /> | |
<target name="logErrorToFile" xsi:type="File" fileName="${basedir}/../Logs/${shortdate}/ErrorLog.txt" layout="${date:format=HH\:mm\:ss\:fff}|${message}|${exception:format=tostring}" /> | |
<target name="logWarnToFile" xsi:type="File" fileName="${basedir}/../Logs/${shortdate}/WarningLog.txt" layout="${date:format=HH\:mm\:ss\:fff}|${message}" /> | |
</targets> | |
<rules> | |
<logger name="*" levels="Info" writeTo="logInfoToFile" /> | |
<logger name="*" levels="Error" writeTo="logErrorToFile" /> |