public IHttpActionResult Get(int id) { GiftBoxService giftBoxService = CreateGiftBoxService(); var giftBox = giftBoxService.GetGiftBoxById(id); return(Ok(giftBox)); }
private GiftBoxService CreateGiftBoxService() { var userId = Guid.Parse(User.Identity.GetUserId()); var giftBoxService = new GiftBoxService(userId); return(giftBoxService); }
public IHttpActionResult Get() { GiftBoxService giftBoxService = CreateGiftBoxService(); var giftBox = giftBoxService.GetGiftBoxes(); return(Ok(giftBox)); }