First commit that builds.

This commit is contained in:
2025-06-29 14:43:35 +02:00
parent 3944764cb5
commit 6d15dcb985
24 changed files with 816 additions and 0 deletions

View File

@ -0,0 +1,22 @@
using System.Linq.Expressions;
namespace MessengerBroker
{
public static class EntityExtensions
{
public static IQueryable<Db.Model.User> GetUsers(this IQueryable<Db.Model.User> source, Guid[] guids)
{
return source.Where(x => guids.Any(g => g == x.Id));
}
public static IQueryable<Db.Model.User> GetUsersExcept(this IQueryable<Db.Model.User> source, IEnumerable<Guid> guids)
{
return source.Where(x => !guids.Any(g => g == x.Id));
}
public static bool GetUserExists(this IQueryable<Db.Model.User> source, Guid id)
{
return source.Any(x=> x.Id == id);
}
}
}