Skip to content

Instantly share code, notes, and snippets.

View yet-another-alexander's full-sized avatar
:octocat:

Alexander Ivanov yet-another-alexander

:octocat:
View GitHub Profile
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- develop
- master
- release/*
@yet-another-alexander
yet-another-alexander / DataExtensions.cs
Last active July 13, 2018 16:20
Entity Framework Extensions
using System;
using System.Data.Entity;
using System.Linq;
using System.Linq.Expressions;
namespace Application
{
public static class DataExtensions
{
public static void RemoveRange<TEntity>(this DbSet<TEntity> entities, Expression<Func<TEntity, bool>> predicate)
@yet-another-alexander
yet-another-alexander / TopologicalSorter.cs
Last active July 13, 2018 16:22
Topological Sort algorithm for sorting items based on dependencies
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Application
{
public static class TopologicalSorter
{
@yet-another-alexander
yet-another-alexander / ValuesController.cs
Created July 12, 2018 10:21
Unit testing for Server.MapPath
using System.Web;
using System.Web.Http;
namespace WebApplication.Controllers
{
public interface IPathProvider
{
string MapPath(string path);
}