-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete Broken for Properties in .ThenInclude in EF Core 3.1 with Visual Studio 2019 #41527
Comments
That's extraordinarily unexpected. I don't know what could even cause behavior like that. I took your code and tried to make a full repro out of it, but I'm not seeing the problem. Do you see the failure with the below code? using Microsoft.EntityFrameworkCore; // From NuGet package Microsoft.EntityFrameworkCore (3.1.1)
using System.Collections.Generic;
using System.Linq;
class C
{
void M()
{
IQueryable<Cliente> clients = default;
clients.Include(c => c.Contactos).ThenInclude(cc => cc.Contacto);
}
}
class Cliente
{
public List<ContactoCliente> Contactos { get; set; }
}
class ContactoCliente
{
public Contacto Contacto { get; set; }
}
public class Contacto
{
} |
Yes, I'm still experiencing the problem, I had to change a little your code to avoid C#8 null w I type dot (.) , then 'cont' and nothing shows up. Then I type 'Contact' completely, it gets recognized by intellisense with the rectangle around it . I select something else so the autocomplete list disapears, then I delete the last 'o' and now 'Contact' shows up in the autocomplete- |
Thank you for the details! I can also reproduce this using the latest official build (16.4.4). This is probably the same as this one, which was fixed by @ivanbasov as part of I've tested in the latest public preview (16.5 Preview 2), and it appears to be fixed there. Feel free to give that preview a try and see if it resolves the issue for you as well. |
Thank you for looking into it. Well, I prefer not to install Preview versions in my machine. The problem itself doesn't bother me too much, I was just trying to help. I'm glad it has been already fixed for future versions. |
Okay, no worries. Thank you for the detailed report! We really appreciate it. Can't wait for it to make it into the official release for you. :) |
@DavidRill No worries at all, I want to make sure we do whatever's needed. I believe I've removed the old @ references. Does that part look good? Does anything else need altered (e.g. code snippets)? |
There is a problem with the autocomplete feature in Visual Studio 2019 and EF Core 3.1: For example I have the following entity clases:
Then autocomplete of cc.Contact fails in the following statement:
ctx.Clients.Include(c => c.Contacts).ThenInclude(cc => cc.Contact)
I have tested it and actually it has a very inconsistent behaviour. The first time you try to type Contact it doesn't show up. But after the first time that you type it manually and you delete it, it starts appearing in the autocompletion list.
I'm writing this new issue because I was told to do it in this original issue about the same problem that is already closed #8237
The text was updated successfully, but these errors were encountered: