Exemplo n.º 1
0
 public IHttpActionResult DeleteBet([FromUri] int BetId)
 {
     using (PaymentEntities1 context = new PaymentEntities1())
     {
         var result = context.bet1.Where(x => x.BetId == BetId).FirstOrDefault();;
         context.bet1.Remove(result);
         context.SaveChanges();
         return(Ok());
     }
 }
Exemplo n.º 2
0
        public IHttpActionResult PostBet(bet1 bet)
        {
            using (PaymentEntities1 context = new PaymentEntities1())
            {
                context.bet1.Add(bet);
                context.SaveChanges();
            }

            return(Ok());
        }