Skip to content

Instantly share code, notes, and snippets.

View dozer75's full-sized avatar

Rune Gulbrandsen dozer75

View GitHub Profile
@dozer75
dozer75 / gulpfile.js
Last active April 14, 2019 08:16
Gulp script to clean up docker tags in batch that are older than one week
/*
* Copyright 2019 Rune Gulbrandsen
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
// Use nuget to reference Microsoft.OData.Core 7.4.4
using System;
using System.IO;
using System.Text;
using Microsoft.OData;
using Microsoft.OData.Edm;
namespace ThrowIfTypeConflictsWithMetadataIgnored
{
@dozer75
dozer75 / ComputedPathUnionAndOrderbyIssue.cs
Created July 7, 2017 15:38
Demonstrating an issue with EFCore using a property that in the select statment is computed by combining two fields, unioned and then order by on the computed property
using System.Linq;
using Microsoft.EntityFrameworkCore;
namespace TestRecursiveContext
{
internal class Entity
{
public int Id { get; set; }
public virtual Entity Parent { get; set; }
@dozer75
dozer75 / 20170630111435_Initial.Designer.cs
Last active June 30, 2017 12:04
AutoMapper ProjectTo and MaxDepth Issue with EF
using System;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using AutoMapperMaxDepth;
namespace AutoMapperSelfReferencingissue.Migrations
{
[DbContext(typeof(Context))]
@dozer75
dozer75 / main.cs
Last active June 29, 2017 19:40
AutoMapper MaxDepth Issue
using System.Diagnostics;
using System.Linq;
using AutoMapper;
using AutoMapper.QueryableExtensions;
namespace AutoMapperMaxDepth
{
internal class Entity
{
public string Name { get; set; }