public string SendClientDailyEmail() { if (string.IsNullOrEmpty(_currentClient)) return string.Empty; using (DB db = new DB(DBHelper.GetConnectionString(_currentClient))) { ClientEmail cEmail = (from o in db.ClientEmails where o.Client == _currentClient select o).FirstOrDefault(); if (cEmail == null) { cEmail = new ClientEmail {Client = _currentClient, SendDailyDigest = true}; db.AddToClientEmails(cEmail); return (db.SaveChanges() > 0).ToString(); } cEmail.SendDailyDigest = true; return (db.SaveChanges() > 0).ToString(); } }