public int AddUser(int boardId, string userId) { var map = mapper.CreateMapper(); BoardDTO board = BoardService.Get(boardId); UserDTO user = UserService.GetById(userId); int i = BoardService.AddUser(board, user); if (i > 0) { return(1); } else { return(-1); } }