public override object Authenticate(DevExpress.ExpressApp.ObjectSpace objectSpace) { if (logonParameters.Employee == null) { throw new ArgumentNullException("User"); } if (!logonParameters.Employee.ComparePassword(logonParameters.Password)) { throw new AuthenticationException(logonParameters.Employee.UserName, "Wrong password"); } return objectSpace.GetObject(logonParameters.Employee); }