// GET /api/blanketdto public IEnumerable <BlanketDTO> Get() { BlanketDataProvider provider = new BlanketDataProvider(); IEnumerable <Blanket> s = provider.GetBlanket(); return(Mapper.Map <IEnumerable <Blanket>, IEnumerable <BlanketDTO> >(s)); }
// GET api/blanket/5 public Blanket Get(int id) { BlanketDataProvider provider = new BlanketDataProvider(); Blanket s = provider.GetBlanket(id); if (s == null) { return(null); } //s.Image=s.byteArrayToImage(s.ImageInBytes); return(s); //return Mapper.Map<Blanket, BlanketDTO>(s); }