3using System.Linq.Expressions;
5using System.Threading.Tasks;
7using Microsoft.EntityFrameworkCore;
29 Expression<Func<User, TResult>> selector,
30 CancellationToken cancellationToken)
32 ArgumentNullException.ThrowIfNull(databaseCollection);
33 ArgumentNullException.ThrowIfNull(selector);
35 return databaseCollection
39 .FirstAsync(cancellationToken);
Extension methods for the IDatabaseCollection<TModel> interface.
static Task< TResult > GetTgsUser< TResult >(this IDatabaseCollection< User > databaseCollection, Expression< Func< User, TResult > > selector, CancellationToken cancellationToken)
Gets User with the name User.TgsSystemUserName.
const string TgsSystemUserName
Username used when creating jobs automatically.
static string CanonicalizeName(string name)
Change a UserName.Name into a CanonicalName.
Represents a database table.