Exemplo n.º 1
0
        public async Task <ActionResult <IEnumerable <Models.GroupUpdate> > > GetGroupUpdates()
        {
            var result = new BS.GroupUpdate(_context).GetAll().ToList();
            var aux    = _mapper.Map <IEnumerable <data.GroupUpdate>, IEnumerable <Models.GroupUpdate> >(result);

            return(aux.ToList());
        }
Exemplo n.º 2
0
        public async Task <ActionResult <data.GroupUpdate> > GetGroupUpdate(int id)
        {
            var groupUpdate = new BS.GroupUpdate(_context).GetOneById(id);

            if (groupUpdate == null)
            {
                return(NotFound());
            }

            return(groupUpdate);
        }
Exemplo n.º 3
0
        public async Task <ActionResult <Models.GroupUpdate> > GetGroupUpdate(int id)
        {
            var groupUpdate = new BS.GroupUpdate(_context).GetOneById(id);
            var aux         = _mapper.Map <data.GroupUpdate, Models.GroupUpdate>(groupUpdate);

            if (aux == null)
            {
                return(NotFound());
            }

            return(aux);
        }