public async Task <IActionResult> GetOffert(int id)
        {
            var offert = await _offertRespository.GetOffert(id);

            var offertResource = OffertMapper.MapOffertToOffertResource(offert);

            return(Ok(offertResource));
        }
Beispiel #2
0
        public async Task <IActionResult> GetOffertPhoto(int id, string sufix)
        {
            var offert = await _offertRespository.GetOffert(id);

            var offertName = offert.Name + sufix;

            var path  = Path.Combine(_hostingEnvironment.WebRootPath, "OffertGallery", "User1");
            var image = System.IO.File.OpenRead(path + "\\" + offertName + ".png");

            return(File(image, "image/png"));
        }