public bool UpdateContentPosts(ContentPost contentPost)
        {
            var errorMessage = "";
            try
            {
                if (contentPost == null)
                    throw new ArgumentNullException("User");

                using (var context = new ContentContext())
                {
                    int rc = context.SaveChanges();
                    return rc > 0 ? true : false;
                }
            }
            catch (DbEntityValidationException dbEx)
            {
                foreach (var validationErrors in dbEx.EntityValidationErrors)
                {
                    foreach (var validationError in validationErrors.ValidationErrors)
                    {
                        errorMessage += Environment.NewLine + string.Format("Property: {0} Error: {1}",
                        validationError.PropertyName, validationError.ErrorMessage);
                    }
                }

                throw new Exception(errorMessage, dbEx);
            }
        }
        public bool DeleteContentPosts(ContentPost contentPost)
        {
            using (var context = new ContentContext())
            {

                context.ContentPosts.Remove(contentPost);
                int rc = context.SaveChanges();
                return rc > 0 ? true : false;
            }
        }
        public bool CreateContentPosts(ContentPost contentPost)
        {

            if (contentPost == null)
                throw new System.NullReferenceException("User cannot be Null");

            try
            {
                using (var context = new ContentContext())
                {
                    //    _contentPostRepository.Create(contentPost);
                    context.ContentPosts.Add(contentPost);
                    int rc = context.SaveChanges();
                    return rc > 0 ? true : false;
                }
            }
            catch
            {
                throw;
            }
        }