public IHttpActionResult CreateBet([FromBody] CreateBetInsertReq model) { model.UserId = User.Identity.GetUserId(); var result = _transactionServices.Create(model); // notify all connected clients //if(result.Data) // Hub.Clients.All.newBet(model); return(ApiHelper.ReturnHttpAction(result, this)); }
public CRUDResult <bool> Create(CreateBetInsertReq obj) { #region Clear cache when insert or update _cache.Invalidate("InfoRoom"); #endregion var param = new DynamicParameters(); param.Add("@RoomId", obj.RoomId); param.Add("@UserId", obj.UserId); param.Add("@AmountBet", obj.AmountBet); _repository.Value.Connection.Execute("SP_Bet_Create", param, commandType: CommandType.StoredProcedure); return(new CRUDResult <bool>() { Data = true, StatusCode = CRUDStatusCodeRes.Success }); }