Exemple #1
0
        public CRUDResult <int> Create(RoomInsertReq obj)
        {
            var data = _repository.Value.Insert <Room>(new Room()
            {
                Name   = obj.Name,
                MaxBet = obj.MaxBet,
                MinBet = obj.MinBet
            });

            return(new CRUDResult <int>()
            {
                Data = data.Id, StatusCode = CRUDStatusCodeRes.ReturnWithData
            });
        }
Exemple #2
0
        public IHttpActionResult Post([FromBody] RoomInsertReq model)
        {
            var result = _roomServices.Create(model);

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