Skip to content

Instantly share code, notes, and snippets.

View andreadottor's full-sized avatar

Andrea Dottor andreadottor

View GitHub Profile
@andreadottor
andreadottor / .gitconfig
Last active August 1, 2023 16:42
Git Aliases
[core]
editor = code --wait
[alias]
co = checkout
st = status
ec = config --global -e
up = !git pull --rebase --prune $@ && git submodule update --init --recursive
cob = checkout -b
cm = !git add -A && git commit -m
save = !git add -A && git commit -m 'SAVEPOINT'
namespace DEVisIT.DapperMultiMap.Entities
{
using System.Collections.Generic;
using System.Diagnostics;
[DebuggerDisplay("{Id} {Name}")]
class Category
{
public Category()
{
@andreadottor
andreadottor / ScrutorSample.cs
Last active May 20, 2022 21:47
Esempio di utilizzo di scrutor
services.Scan(scan => scan
.FromCallingAssembly() // 1. Find the concrete classes
.AddClasses() // to register
.UsingRegistrationStrategy(RegistrationStrategy.Skip) // 2. Define how to handle duplicates
.AsSelf() // 2. Specify which services they are registered as
.WithTransientLifetime()); // 3. Set the lifetime for the services
// Registra tutte le classi, quando richiesta la loro interfaccia
services.Scan(scan =>
scan.FromCallingAssembly()