Skip to content

Instantly share code, notes, and snippets.

@haacked
haacked / ModelBuilderExtensions.cs
Last active July 23, 2025 15:11
Example of applying an EF Core global query filter on all entity types that implement an interface
/*
Copyright Phil Haack
Licensed under the MIT license - https://github.com/haacked/CodeHaacks/blob/main/LICENSE.
*/
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
@ahmetkucukoglu
ahmetkucukoglu / github_to_iis_deployment
Last active April 27, 2024 15:47
Jenkinsfile - Github to IIS Deployment
//Kaynak kodun adresi
String githubUrl = "https://github.com/ahmetkucukoglu/aspnetcore-ci-sample"
//Kaynak kodun içerisindeki projenin ismi
String projectName = "CISample/CISample.App"
//Kaynak kodun publish edileceği dizin
String publishedPath = "CISample\\CISample.App\\bin\\Release\\netcoreapp2.2\\publish"
//Hedef makinesindeki IIS'de tanımlı olan sitenizin ismi
@slightfoot
slightfoot / appbar_demo.dart
Created July 2, 2018 01:50
Demonstrate how to change the AppBar from within a PageView.
import 'package:flutter/material.dart';
void main() => runApp(TestApp());
class TestApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(
primaryColor: Colors.green[900],
@jaredswarts55
jaredswarts55 / DelegatingHandler.cs
Last active September 2, 2021 16:15
Delegating Handler for user dependency injection.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http.OData.Routing;
namespace Project.WebService.Authorization
{
using System.Net.Http;
using System.Threading;