Exemplo n.º 1
0
        internal Blog Get(int id)
        {
            //NOTE If you do not null check you could get a 204 (No Context) if the blog was not found
            Blog found = _repo.Get(id);

            if (found == null)
            {
                throw new Exception("Invalid Id");
            }
            return(found);
        }
Exemplo n.º 2
0
 internal IEnumerable <Blog> Get()
 {
     return(_repo.Get());
 }
 public IEnumerable <Blog> Get()
 {
     return(_repo.Get());
 }