Blog.Logic.Core.EducationLogic.GetByUser C# (CSharp) Méthode

GetByUser() public méthode

public GetByUser ( int userId ) : List
userId int
Résultat List
        public List<Education> GetByUser(int userId)
        {
            var education = new List<Education>();
            try
            {
                var db = _educationRepository.Find(a => a.UserId == userId, true).ToList();
                db.ForEach(a => education.Add(EducationMapper.ToDto(a)));
            }
            catch (Exception ex)
            {
                throw new BlogException(ex.Message, ex.InnerException);
            }
            return education;
        }