Exemplo n.º 1
0
 public Group GroupGet(string name, Group.Type type)
 {
     try
     {
         return(Groups.FirstOrDefault(@group => @group.Name == name && @group.GroupType == type));
     }
     catch (Exception ex)
     {
         Log.Error(ex);
         return(null);
     }
 }
Exemplo n.º 2
0
 public Group GroupGet(int id, Group.Type type)
 {
     try
     {
         if (type != Group.Type.Mixed)
         {
             return(_groups.FirstOrDefault(@group => @group.Id == id && @group.GroupType == type));
         }
         return(_mixedGroups.FirstOrDefault(@group => @group.Id == id));
     }
     catch (Exception ex)
     {
         Log.Error(ex);
         return(null);
     }
 }