Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using (var contexto = new ContextoAcessoDados())
- {
- contexto.Configuration.LazyLoadingEnabled = false;
- //Ao carregar projeto o gerente deve ser carregado também
- var projeto = contexto.Projetos.Include(x => x.Gerente).FirstOrDefault();
- System.Console.WriteLine("Nome gerente:" + projeto.Gerente.Nome);
- }
Add Comment
Please, Sign In to add comment