Moved projects to their own separate subdirectories

This commit is contained in:
2023-03-27 21:48:25 -05:00
parent baf38aa3cd
commit 9b590bb4fa
134 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,23 @@
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using YABA.Models;
namespace YABA.Data.Extensions
{
public static class UsersDbSetExtensions
{
public static async Task<bool> UserExistsAsync(this DbSet<User> userDbSet, int userId)
{
return await userDbSet.AnyAsync(x => x.Id == userId);
}
public static bool UserExists(this DbSet<User> userDbSet, int userId)
{
return userDbSet.Any(x => x.Id == userId);
}
}
}