示例#1
0
        internal Lego GetById(int id)
        {
            var exists = _repo.GetById(id);

            if (exists == null)
            {
                throw new Exception("Invalid Id");
            }
            return(exists);
        }
示例#2
0
        internal Lego GetById(int id)
        {
            Lego foundLego = _repo.GetById(id);

            if (foundLego == null)
            {
                throw new Exception("Invalid id.");
            }
            return(foundLego);
        }