Example #1
0
        public BllImage MapToBll(DalImage entity)
        {
            BllImage bllEntity = new BllImage
            {
                Id    = entity.Id,
                Image = entity.Image
            };

            return(bllEntity);
        }
Example #2
0
        public DalImage MapToDal(BllImage entity)
        {
            DalImage dalEntity = new DalImage
            {
                Id    = entity.Id,
                Image = entity.Image
            };

            return(dalEntity);
        }
Example #3
0
 public static DalImage ToDalImage(this BllImage bllImage)
 {
     return(new DalImage()
     {
         Id = bllImage.Id,
         Name = bllImage.Name,
         Type = bllImage.Type,
         Size = bllImage.Size,
         Content = bllImage.Content,
     });
 }
Example #4
0
        public FileStreamResult GetImage(int id)
        {
            BllImage image = imageService.GetImage(id);

            return(new FileStreamResult(image.Content, "image//" + image.Content));
        }