예제 #1
0
        public async Task <ActionResult <data.Foci> > GetFoci(int id)
        {
            var foci = new Solution.BS.Foci(_context).GetOneById(id);

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

            return(foci);
        }
예제 #2
0
        public async Task <ActionResult <datamodels.Foci> > DeleteFoci(int id)
        {
            var foci = new Solution.BS.Foci(_context).GetOneById(id);

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

            new Solution.BS.Foci(_context).Delete(foci);
            var mapaux = _mapper.Map <data.Foci, datamodels.Foci>(foci);


            return(mapaux);
        }