public IHttpActionResult PutCampaignTheme(int id, CampaignTheme campaignTheme)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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

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

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

            return(StatusCode(HttpStatusCode.NoContent));
        }
        public IHttpActionResult GetCampaignTheme(int id)
        {
            CampaignTheme campaignTheme = db.CampaignThemes.Find(id);

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

            return(Ok(campaignTheme));
        }
        public IHttpActionResult PostCampaignTheme(CampaignTheme campaignTheme)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            db.CampaignThemes.Add(campaignTheme);
            db.SaveChanges();

            return(CreatedAtRoute("DefaultApi", new { id = campaignTheme.Id }, campaignTheme));
        }
        public IHttpActionResult DeleteCampaignTheme(int id)
        {
            CampaignTheme campaignTheme = db.CampaignThemes.Find(id);

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

            db.CampaignThemes.Remove(campaignTheme);
            db.SaveChanges();

            return(Ok(campaignTheme));
        }