示例#1
0
 public IActionResult GetAll()
 {
     try
     {
         var response = _mapper.Map <IList <Local>, IList <LocalViewModel> >(_localAppService.GetAll());
         return(Ok(response));
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
 }
示例#2
0
        // GET api/locais
        public IEnumerable <LocalViewModel> Get()
        {
            var localviewmodel = Mapper.Map <IEnumerable <Local>, IEnumerable <LocalViewModel> >(_localApp.GetAll());

            return(localviewmodel);
        }