public IHttpActionResult PuttblMatchType(int id, tblMatchType tblMatchType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tblMatchType.Id)
            {
                return(BadRequest());
            }

            db.Entry(tblMatchType).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!tblMatchTypeExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GettblMatchType(int id)
        {
            tblMatchType tblMatchType = db.tblMatchTypes.Find(id);

            if (tblMatchType == null)
            {
                return(NotFound());
            }

            return(Ok(tblMatchType));
        }
        public IHttpActionResult PosttblMatchType(tblMatchType tblMatchType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.tblMatchTypes.Add(tblMatchType);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = tblMatchType.Id }, tblMatchType));
        }
        public IHttpActionResult DeletetblMatchType(int id)
        {
            tblMatchType tblMatchType = db.tblMatchTypes.Find(id);

            if (tblMatchType == null)
            {
                return(NotFound());
            }

            db.tblMatchTypes.Remove(tblMatchType);
            db.SaveChanges();

            return(Ok(tblMatchType));
        }