-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Select Error in Entityframework core 3.1.2 #20331
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@hejiajun107 Please attach a small, runnable project or post a small, runnable code listing that reproduces the behavior you are seeing so that we can investigate. |
The runable demo is as follewed |
Note for team triage: In-memory provider; AbsolutePathFaceUrl is not mapped. var data = context
.Set<Topic>()
.Where(t => t.Name.Contains("topic"))
.Include(x => x.Student)
.OrderByDescending(x => x.Id)
.Select(x => new
{
Topic = x,
Student = new
{
Name = x.Student.Name,
AbsoluteFaceUrl = x.Student.AbsolutePathFaceUrl
},
IsFavored = false
}).Skip(1).Take(10).ToList(); public class Student
{
public int Id { get; set; }
public string Name { get; set; }
public string FaceUrl { get; set; }
[NotMapped]
public string AbsolutePathFaceUrl {
get {
if(string.IsNullOrEmpty(FaceUrl))
{
return "";
}
return "https://www.baidu.com/" + FaceUrl + "?timespan=" + DateTime.Now.ToString("yyyyMMddHHmmss");
}
}
}
|
@ajcvickers - Can you try on nightlies? We have fixed bunch of issues in nav expansion around unmapped properties in projection followed by skip/take. |
@smitpatel The exception is no longer thrown with 5.0 preview 1. Dupe? |
Probably fixed by #19377, couldn't find specific dupe. |
An error will occur when selct into a complex object "EF.Property called with wrong property name"

The text was updated successfully, but these errors were encountered: