public async Task <IHttpActionResult> PuttReactionType(int id, tReactionType ReactionType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != ReactionType.ID)
            {
                return(BadRequest());
            }

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

            try
            {
                await db.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!tReactionTypeExists(id))
                {
                    return(NotFound());
                }
                else
                {
                    throw;
                }
            }

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public async Task <IHttpActionResult> GettReactionType(int id)
        {
            tReactionType tReactionType = await db.tReactionTypes.FindAsync(id);

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

            return(Ok(tReactionType));
        }
        public async Task <IHttpActionResult> PosttReactionType(tReactionType ReactionType)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.tReactionTypes.Add(ReactionType);
            await db.SaveChangesAsync();

            return(CreatedAtRoute("DefaultApi", new { id = ReactionType.ID }, ReactionType));
        }
        public async Task <IHttpActionResult> DeletetReactionType(int id)
        {
            tReactionType tReactionType = await db.tReactionTypes.FindAsync(id);

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

            db.tReactionTypes.Remove(tReactionType);
            await db.SaveChangesAsync();

            return(Ok(tReactionType));
        }