Exemple #1
0
        public async Task <IHttpActionResult> DownloadStampa(Guid id)
        {
            try
            {
                var stampa = await _logic.GetStampa(id);

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

                var response = ResponseMessage(await _logic.DownloadStampa(stampa));

                return(response);
            }
            catch (Exception e)
            {
                Log.Error("DownloadStampa", e);
                return(ErrorHandler(e));
            }
        }
Exemple #2
0
        public async Task <IHttpActionResult> GetStampa(Guid id)
        {
            try
            {
                var result = await _logic.GetStampa(id);

                return(Ok(Mapper.Map <STAMPE, StampaDto>(result)));
            }
            catch (Exception e)
            {
                Log.Error("GetStampa", e);
                return(ErrorHandler(e));
            }
        }