Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Academic AddCredit(Credit credit)
        {
            var academic = academicRepository.Get(x => x.AcademicId == credit.AcademicId);

            creditRepository.Add(credit);

            academic.Balance += credit.Value;
            academicRepository.Update(academic);

            unitOfWork.Commit();

            return(academic);
        }
Exemplo n.º 2
0
 public Academic GetAcademic(string login)
 {
     return(academicRepository.Get(x => x.Login == login));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Retorna o Academic com o Id correspondente
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public Academic GetAcademic(int id)
 {
     return(academicRepository.Get(x => x.AcademicId == id));
 }