Global usings and file scoped namespaces

This commit is contained in:
Kwoth
2021-12-19 05:14:11 +01:00
parent bc31dae965
commit ee33313519
548 changed files with 47528 additions and 49115 deletions

View File

@@ -1,12 +1,10 @@
using System.Linq;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using NadekoBot.Services.Database.Models;
namespace NadekoBot.Db
namespace NadekoBot.Db;
public static class DbExtensions
{
public static class DbExtensions
{
public static T GetById<T>(this DbSet<T> set, int id) where T: DbEntity
=> set.FirstOrDefault(x => x.Id == id);
}
public static T GetById<T>(this DbSet<T> set, int id) where T: DbEntity
=> set.FirstOrDefault(x => x.Id == id);
}