Пример #1
0
        // GET /api/smer
        public IEnumerable <Smer> Get()
        {
            SmerDataProvider provider = new SmerDataProvider();

            IEnumerable <Smer> s = provider.GetSmer();

            return(s);
        }
Пример #2
0
        // 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));
        }