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 }); }
public IHttpActionResult Post([FromBody] BetInsertReq model) { var result = _betServices.Create(model); return(ApiHelper.ReturnHttpAction(result, this)); }