コード例 #1
0
        internal Castle GetCastleById(int id)
        {
            Castle castle = _repo.GetCastleById(id);

            if (castle == null)
            {
                throw new Exception("Invalid ID");
            }
            return(castle);
        }
コード例 #2
0
        internal Castle GetCastleById(int id)
        {
            Castle original = _repo.GetCastleById(id);

            if (original == null)
            {
                throw new SystemException("INVALID ID");
            }
            else
            {
                return(original);
            }
        }