コード例 #1
0
        public CRUDResult <int> Create(BetInsertReq obj)
        {
            var model = _repository.Value.Insert <Bet>(new Bet()
            {
                Code       = obj.Code,
                RoomId     = obj.RoomId,
                TotalBet   = obj.TotalBet,
                CreateDate = DateTime.Now,
                IsComplete = false
            });

            return(new CRUDResult <int>()
            {
                Data = model.Id, StatusCode = CRUDStatusCodeRes.ReturnWithData
            });
        }
コード例 #2
0
ファイル: BetsController.cs プロジェクト: duyxaoke/Solution
        public IHttpActionResult Post([FromBody] BetInsertReq model)
        {
            var result = _betServices.Create(model);

            return(ApiHelper.ReturnHttpAction(result, this));
        }