// GET /api/smer public IEnumerable <Smer> Get() { SmerDataProvider provider = new SmerDataProvider(); IEnumerable <Smer> s = provider.GetSmer(); return(s); }
// GET api/smer/5 public SmerDTO Get(int id) { SmerDataProvider provider = new SmerDataProvider(); Smer s = provider.GetSmer(id); if (s == null) { return(null); } return(Mapper.Map <Smer, SmerDTO>(s)); }