public UserAuthenticationResponse UserLogin(UserAuthenticationRequest request) { var response = new UserAuthenticationResponse(); Epi.Web.Enter.Interfaces.DataInterfaces.IDaoFactory entityDaoFactory = new EFwcf.EntityDaoFactory(); Epi.Web.Enter.Interfaces.DataInterface.IUserDao IUserDao = entityDaoFactory.UserDao; Epi.Web.BLL.User Implementation = new Epi.Web.BLL.User(IUserDao); UserBO UserBO = Mapper.ToUserBO(request.User); UserBO result = Implementation.GetUser(UserBO); if (result != null) { //response.Acknowledge = AcknowledgeType.Failure; TBD //response.Message = "Invalid Pass Code."; response.User = Mapper.ToUserDTO(result); response.UserIsValid = true; } else { response.UserIsValid = false; } return(response); }
public UserAuthenticationResponse ValidateUser(UserAuthenticationRequest userAuthenticationRequest) { var response = new UserAuthenticationResponse(); Epi.Web.BLL.User userImplementation = new Epi.Web.BLL.User(_userDao); UserBO UserBO = userAuthenticationRequest.User.ToUserBO(); UserBO result = userImplementation.GetUser(UserBO); if (result != null) { response.User = result.ToUserDTO(); response.UserIsValid = true; } else { response.UserIsValid = false; } return(response); }