Passing the where parameters by the function
How do I get this sample code to work? Unfortunately, it does not want to work.
Use:
Use:
public async Task<User> GetAsync(Func<Models.User, bool> selector)
{
_model = await this.GetData().Where(x => selector(x)).SingleOrDefaultAsync() ?? new();
return new(_context, _model);
}var user = await User.GetAsync(x => x.Mail == Model.Identifier || (x.Phone == Model.Identifier && x.PhoneCode == Model.PhoneCode));