public object GetImages(string ids, int width = 350, int height = 250) { List <object> results = new List <object>(); foreach (string id in (ids ?? string.Empty).Split(',')) { ElementsImage media = GetImageFromCache(id, width, height) ?? GetImageFromService(id, width, height); if (media == null) { return(null); } results.Add(media); } return(results); }
public object GetImage(string id, int width = 350, int height = 250) { ElementsImage image = GetImageFromCache(id, width, height) ?? GetImageFromService(id, width, height); return(Request.CreateResponse(image == null ? HttpStatusCode.NotFound : HttpStatusCode.OK, image)); }