Esempio n. 1
0
        internal Castle GetById(int id)
        {
            Castle data = _repo.GetById(id);

            if (data == null)
            {
                throw new Exception("Invalid Id");
            }
            return(data);
        }
Esempio n. 2
0
        internal Castle GetById(int id)
        {
            Castle castle = _repo.GetById(id);

            if (castle == null)
            {
                throw new Exception("Invalid ID");
            }
            return(castle);
        }