EF Core error #3573
EF Core error
#3573
-
repo: https://github.com/mhamri/ef-int32-bug applying oData queries on top of projected IQueryable throwing error. this was not the case for the older version. Source/destination typessource: public class Store
{
public int Id { get; set; }
public string Name { get; set; }
public int OwnerId { get; set; }
public Person Owner { get; set; }
public ICollection<Book> Books { get; set; }
public ICollection<BookStore> BookStore { get; set; }
} destination public class StoreModel
{
public int Id { get; set; }
public string Name { get; set; }
public PersonModel Owner { get; set; }
public ICollection<BookModel> Books { get; set; }
public IEnumerable<BookStoreModel> BookStore { get; set; }
} Mapping configurationCreateMap<Person, PersonModel>();
CreateMap<Book, BookModel>();
CreateMap<Store, StoreModel>();
CreateMap<BookStore, BookStoreModel>(); Version: 10.1.1Expected behaviorlike the previous version return result! Actual behaviorthrowing error
I'm not sure why even there is a nullable value Steps to reproduceplease check the repo |
Beta Was this translation helpful? Give feedback.
Answered by
lbargaoanu
Feb 5, 2021
Replies: 1 comment
-
That looks like an EF Core issue. Check the execution plan. Run that as a LINQ statement, without AM. You should get the same result. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lbargaoanu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That looks like an EF Core issue. Check the execution plan. Run that as a LINQ statement, without AM. You should get the same result.
dotnet/efcore#24092