// GET: Pack public ActionResult Index() { List <Pack> list = new List <Pack>(); foreach (var item in PackService.GetAll()) { Pack AVM = new Pack(); AVM.Id = item.Id; AVM.date_deb = item.date_deb; AVM.date_expiration = item.date_expiration; AVM.ListPanier = item.ListPanier; AVM.ListProduct = item.ListProduct; AVM.Price = item.Price; list.Add(AVM); } return(View(list)); }
public async Task <IActionResult> GetPacks() { return(Ok(await _packService.GetAll())); }
public async Task <IList <Pack> > Get() { var userId = User.FindFirst(ClaimTypes.NameIdentifier)?.Value; //TODO move to currentUserContext return(await _packService.GetAll(userId)); }