コード例 #1
0
ファイル: LegosService.cs プロジェクト: JD-Fuller/legos
        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);
        }