and shows the following example:Any clause returns True if the input sequence contains any elements, otherwise False
Code: Select all
Linq.From(Emp)
.Select([Emp['EmpNo'], Emp['EName']])
.Any(Emp['Sal'] >= 1000)
Code: Select all
function TdmSecurityService.IsValidLogin(AUsername, APassword: string): boolean;
var
Context: TDQCLabManagerDataContext;
Users: IUserEntityExpression;
begin
Context := dmDatabaseService.CreateContext;
Users := Context.UserEntity;
Result := Linq.From(Users)
.Select
.Any(
(Users['Username'] = AUserName)
AND
(Users[Context.Model.UserEntity.Password.Name] = APassword ));
end;
What's wrong?[dcc64 Error] D_SecurityService.pas(48): E2010 Incompatible types: 'Boolean' and 'ILinqQueryable'