Ejemplo n.º 1
0
        public string BlockPhrase(int id, string user)
        {
            var phrase = _repo.Translations.Find(id);

            if (!string.IsNullOrEmpty(phrase.BlockedBy))
            {
                return(phrase.BlockedBy);
            }
            if (!string.IsNullOrEmpty(phrase.Spanish))
            {
                return(phrase.TransBy);
            }
            phrase.BlockedBy   = user;
            phrase.BlockedTime = DateTime.Now;
            _repo.Translations.Update(phrase);
            _repo.SaveChanges();
            return("");
        }