public UserDTO Login(string userName, string password) { UserDTO user = null; var result = userDAO.GetAll().SingleOrDefault(x => x.Username == userName); if (result != null && result.Password == password) { user = new UserDTO(result); } return(user); }
public List <RoleDTO> GetRoles() { return(_roleDAO.GetAll().Select(x => new RoleDTO(x)).ToList()); }