public Byte[] GetPhotos(int orderId, int index) { var res = _photosRepository.GetByOrder(orderId); var photoPath = res.Skip(index).Take(1).FirstOrDefault(); Byte[] b = System.IO.File.ReadAllBytes(photoPath); return(b); }