private async void OnSelectedListView(PromotionProductModel promotion) { UpdateCommand Data = new UpdateCommand() { UserId = UserId, PromotionId = promotion.Id }; await App.Current.MainPage.Navigation.PushAsync(new GetPromotionPage(Data)); }
public IActionResult AddPromotion([FromBody] PromotionProductModel command) { try { var result = context.Tb_PromotionProduct.Add(command); if (result == null) { return(BadRequest()); } else { context.SaveChanges(); return(Ok("Success")); } } catch (Exception e) { return(BadRequest(e.Message)); } }