public void AddWords(UpdateWordRequest request)
        {
            var query = @"
                INSERT INTO Word (Word, CreatedBy)
                VALUES (@Word,@CreatedBy)";

            var existed = GetAllWords()
                .Select(l => l.Text).ToList();

            var wordsToBeSaved = request.Words
            .Where(l => !existed.Contains(l, StringComparer.OrdinalIgnoreCase))
            .ToList();

            foreach (var item in wordsToBeSaved)
            {
                var parameters = new List<SQLiteParameter>();
                parameters.Add(new SQLiteParameter("Word", item));
                parameters.Add(new SQLiteParameter("CreatedBy", request.CreatedBy));

                try
                {
                    SQLiteHelper.ExecuteNonQuery(query, parameters.ToArray());
                }
                catch (SQLiteException) { }
            }
        }
        public void Expire(UpdateWordRequest request)
        {
            var query = @"
                UPDATE Word
                SET IsExpired = 1, ExpiredAt = CURRENT_TIMESTAMP
                WHERE Word=@Word";

            foreach (var item in request.Words)
            {
                var parameters = new List<SQLiteParameter>();
                parameters.Add(new SQLiteParameter("Word", item));
                try
                {
                    SQLiteHelper.ExecuteNonQuery(query, parameters.ToArray());
                }
                catch (SQLiteException) { }
            }
        }
 public HttpResponseMessage Expire(UpdateWordRequest request)
 {
     var engine = new WordEngine();
     engine.Expire(request);
     return Request.CreateResponse(HttpStatusCode.Created);
 }