Ejemplo n.º 1
0
        public HttpResponseMessage RegisterPlayer([FromBody] PlayerDetailsModel details)
        {
            bool bRes = _playerRepo.InsertPlayer(details);

            HttpResponseMessage response = ((bRes) ? Request.CreateResponse(HttpStatusCode.OK, "Details have been entered correctly.")
                : Request.CreateResponse(HttpStatusCode.BadRequest, "Error when inserting."));

            return(response);
        }