public bool AddNewTermWithSynonyms(TermWithSynonymsInput termWithSynonymsInput) { return(ExecuteDbOperation(() => { var termWithSynonyms = _synonymsMapper.Map(termWithSynonymsInput); using (var applicationDbContext = _applicationDbContextFactory()) { applicationDbContext.Add(termWithSynonyms); applicationDbContext.SaveChanges(); } return true; })); }
public TermWithSynonyms Map(TermWithSynonymsInput termWithSynonymsInput) { return(new TermWithSynonyms(termWithSynonymsInput.Term, termWithSynonymsInput.Synonyms)); }