public async Task <IHttpActionResult> GetHiramsCraftProduct([FromUri] int id) { HiramsCraftProduct hiramscraftproduct = await db.HiramsCraftProducts.FindAsync(id); if (hiramscraftproduct == null) { return(NotFound()); } HiramsCraftProductEntity prodEntity = new HiramsCraftProductEntity(hiramscraftproduct); return(Ok(prodEntity)); }
// GET api/Products public List <HiramsCraftProductEntity> GetHiramsCraftProducts() { List <HiramsCraftProductEntity> prods = new List <HiramsCraftProductEntity>(); foreach (var p in db.HiramsCraftProducts) { HiramsCraftProductEntity prodEntity = new HiramsCraftProductEntity(p); prods.Add(prodEntity); } return(prods); }