Exemple #1
0
 public IEnumerable <TodoViewModel> Get(string description)
 {
     try
     {
         if (!string.IsNullOrEmpty(description))
         {
             return(Mapper.Map <IEnumerable <Todo>, IEnumerable <TodoViewModel> >(_todoApp.GetByDescription(description)));
         }
         return(Mapper.Map <IEnumerable <Todo>, IEnumerable <TodoViewModel> >(_todoApp.GetAll()));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }