Exemplo n.º 1
0
        // GET api/absence/5
        public AbsenceCustom Get(int id)
        {
            var           entity = uow.AbsenceManager.GetByID(id);
            AbsenceCustom abs    = new AbsenceCustom();

            abs.id          = entity.id;
            abs.status      = entity.status;
            abs.absenceDate = entity.absenceDate;
            return(abs);
        }
Exemplo n.º 2
0
 // GET api/absence/5
 public AbsenceCustom Get(int id)
 {
     try
     {
         var           entity = unitOfWork.AbsenceManager.GetByID(id);
         AbsenceCustom abs    = new AbsenceCustom();
         abs.id          = entity.id;
         abs.status      = entity.status;
         abs.absenceDate = entity.absenceDate;
         return(abs);
     }
     catch
     {
         return(null);
     }
 }