public bool DeleteMailGroup(DataContact.MailGroup.MailGroupDataRequest req)
 {
     try
     {
         var group = EmailGroupRepository.GetAll().Where(x => x.GroupId == req.GroupId).FirstOrDefault();
         EmailGroupRepository.Remove(group);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool AddMailGroup(DataContact.MailGroup.MailGroupDataRequest req)
 {
     try
     {
         EmailGroupRepository.Insert(new EmailGroupModel()
         {
             GroupName = req.GroupName
         });
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }