/// <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); }
public Academic GetAcademic(string login) { return(academicRepository.Get(x => x.Login == login)); }
/// <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)); }