note Select is used to project elements into a sequence
Los mantenedores suelen responder en 1 día
@tdykstra ya está trabajando en esto.
Desde el 21/5/2026.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Description
In the section: Loading related data with Select,
I am not sure how the Select function really fits into the context of the differences between eager and lazy loading. (I've always been a little fuzzy here. I just always use eager loading when I need a nav prop filled)
But if this example should go here I would explain the fact that the Selection function being used here projects elements of a sequence into a new form be it a view model or a var variable capable of holding an anonymous type.
Your View Model projection example:
public IList CourseVM { get; set; }
public async Task OnGetAsync()
{
CourseVM = await _context.Courses
.Select(p => new CourseViewModel
{
CourseID = p.CourseID,
Title = p.Title,
Credits = p.Credits,
DepartmentName = p.Department.Name
}).ToListAsync();
}
My inline anonymous object example:
var coursesProjected = await _context.Courses
.Select(p => new
{
CourseID = p.CourseID,
Title = p.Title,
Credits = p.Credits,
DepartmentName = p.Department.Name
}).ToListAsync();
coursesProjected has to be of type var here to work.
Page URL
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/data/ef-rp/read-related-data.md
Document ID
3cb264da-2ff1-1256-572f-aa4ebca6e255
Platform Id
5d8ba75a-678a-21ac-469c-05e8afe24128
Article author
@tdykstra
Metadata
- ID: d0026f69-7e5d-0d3e-5586-16ecc0656ff0
- PlatformId: 5d8ba75a-678a-21ac-469c-05e8afe24128
- Service: aspnet-core
- Sub-service: data-access
- Lenguaje dominante
- C#
- Estrellas
- 13.1k
- Forks
- 24.5k
- Merge medio
- 3 d 6 h
- PR fusionados (30 d)
- 210
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de dotnet/AspNetCore.Docs
-
aspnet-core/svc doc-enhancement mvc/subsvc Pri2
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dotnet/AspNetCore.Docs#38016 ·
Los mantenedores suelen responder en 1 día
-
Update sample app and articleAbiertoaspnet-core/svc doc-enhancement hosting-deployment/subsvc Pri2 Source - Docs.ms
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dotnet/AspNetCore.Docs#38009 ·
Los mantenedores suelen responder en 1 día
-
:watch: Not Triaged CAC
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
dotnet/AspNetCore.Docs#38000 ·
Los mantenedores suelen responder en 1 día
-
:watch: Not Triaged CAC
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
dotnet/AspNetCore.Docs#37998 ·
Los mantenedores suelen responder en 1 día
-
[AI-Suggested] Content update request from UUF signal: Build a Blazor movie database app (Part 1 - Create a Blazor Web App) | Microsoft LearnPosiblemente ocupada @guardrex la tomó hace 4 días. Abierto:watch: Not Triaged CAC
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
dotnet/AspNetCore.Docs#37995 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de dotnet/AspNetCore.Docs
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
possible bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
-
Include host.wslc.internal in the HTTPS development certificatePosiblemente ocupada @afscrome la tomó hoy. Abiertoarea-commandlinetools
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
dotnet/aspnetcore#70122 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
:1st_place_medal: good first issue :cowboy_hat_face: refactor :roller_coaster: enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ApplETS/Backend-Hello#78 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 2 días