public ActionResult <CategoryServicesMv> Get(int id) { try { var data = new CategoryServicesDao(_unitOfWork, _mapper).GetById(id); if (data == null) { return(NotFound()); } return(data); } catch (Exception e) { Console.WriteLine(e); return(NotFound()); } }
public ActionResult <IEnumerable <CategoryServicesMv> > Get() { try { var data = new CategoryServicesDao(_unitOfWork, _mapper).GetAll(); if (data == null) { return(NotFound()); } return(data); } catch (Exception e) { Console.WriteLine(e); return(NotFound()); } }