Skip to content
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

CC0091 reporting on member methods using parameter that defined in primary constructor #1087

Open
n0099 opened this issue Mar 26, 2024 · 0 comments

Comments

@n0099
Copy link

n0099 commented Mar 26, 2024

Bug

public class ModelBuilderHelper(ModelBuilder builder, string baseTableName)
{
    public void HasKey<TRevision>(Expression<Func<TRevision, object?>> keySelector)
        where TRevision : class, TBaseRevision =>
        builder.Entity<TRevision>().ToTable(baseTableName).HasKey(keySelector);
}

Current output after fix applied (if it is a code fix bug):

Unchanged since should not reporting

Expected output after fix applied (if it is a code fix bug):

public class ModelBuilderHelper(ModelBuilder builder, string baseTableName)
{
    public static void HasKey<TRevision>(Expression<Func<TRevision, object?>> keySelector)
        where TRevision : class, TBaseRevision =>
        builder.Entity<TRevision>().ToTable(baseTableName).HasKey(keySelector);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant