Пример #1
0
 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);
     }
 }
Пример #2
0
 public bool AddMailGroup(DataContact.MailGroup.MailGroupDataRequest req)
 {
     try
     {
         EmailGroupRepository.Insert(new EmailGroupModel()
         {
             GroupName = req.GroupName
         });
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }