public bool AddIfKeyNotExist(string key, string value) { if (!HasKey(key)) { var dicItem = new MyDictionary() { Key = key, Value = value }; _dbContext.Dictionary.Add(dicItem); _dbContext.SaveChanges(); return(true); } return(false); }
public void InsertMailList(MailList[] list) { _dbContext.MailLists.AddRange(list); _dbContext.SaveChanges(); }