Example #1
0
 public IActionResult Get(Guid id)
 {
     try
     {
         var item   = _storage.Find(id);
         var result = new ReminderItemViewModel(item);
         return(Ok(result));
     }
     catch (KeyNotFoundException)
     {
         return(BadRequest());
     }
 }
Example #2
0
 public IActionResult Get(Guid id)
 {
     try
     {
         var item = _storage.Find(id);
         return(Ok(new ReminderItemViewModel(item)));
     }
     catch (ArgumentNullException)
     {
         return(BadRequest());
     }
     catch (ArgumentException)
     {
         return(NotFound());
     }
 }