public IHttpActionResult DeleteCustomText(int id)
        {
            CustomText customText = db.CustomTexts.Find(id);

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

            db.CustomTexts.Remove(customText);
            db.SaveChanges();

            return(Ok(customText));
        }
        public CustomText UpsertCustomText(CustomText customText, CustomTextDBEntities2 db)
        {
            using (db)
            {
                if (customText.TextId == default(int))
                {
                    db.CustomTexts.Add(customText);
                }
                else
                {
                    db.Entry(customText).State = EntityState.Modified;
                }

                db.SaveChanges();
                return(customText);
            }
        }