public static UsersDTO GetProfessionalById(int id) { using (RecommendationsEntities3 db = new RecommendationsEntities3()) { var p = db.Users.Find(id); if (p.Professionals != null) { return(ProfessionalConvertion.ProfessionalToDTO(p.Professionals)); } return(UsersConvertion.UserToDTO(p)); } }