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

The FindAsync signature is inconsistent between IReadOnlyBasicRepository and EfCoreRepository #17850

Closed
1 task done
pangjianxin opened this issue Oct 12, 2023 · 3 comments
Closed
1 task done

Comments

@pangjianxin
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Description

I encountered such a visual studio warning(CS8613) after upgrading to 7.4.0:
image
the image above shows the error that the FindAsync method's signature is inconsistent between IReadOnlyBasicRepository and EfCoreRepository

Reproduction Steps

just update to abp vnext 7.4.0,then you will find this error, in case you defined some repositories which implement the IReposisotry<TEntity,TKey> and inherit the EfCoreRepository meanwhile.

Expected behavior

EfCoreRepository should fix the FindAsync method's signature,to satisfy the IReadOnlyBasicRepository

Actual behavior

as showed above

Regression?

No response

Known Workarounds

No response

Version

7.4.0

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

@maliming maliming self-assigned this Oct 12, 2023
@maliming
Copy link
Member

you will find this error, in case you defined some repositories which implement the IReposisotry<TEntity,TKey> and inherit the EfCoreRepository meanwhile.

Please share the code, Thanks.

@maliming maliming removed the bug label Oct 12, 2023
@pangjianxin
Copy link
Author

1、upgrade abp cli to 7.4 with 'dotnet tool update -g volo.abp.cli' and then create a abp project with 'abp new Test -u mvc -t app'.
2、create a named 'Tests' folder in Domain layer,and create MyTest class and IMyTestRepository interface under the 'Tests' folder:
public class MyTest : AuditedAggregateRoot<Guid> { } public interface IMyTestRepository : IRepository<MyTest, Guid> { }
3、create a named MyTestRepository under the 'Tests' folder in EntityFrameworkCore layer:
public class MyTestRepository : EfCoreRepository<TestDbContext, MyTest, Guid>, IMyTestRepository { public MyTestRepository(IDbContextProvider<TestDbContext> dbContextProvider) : base(dbContextProvider) { } }
4、then you will get this warning(CS8613) :
image

@maliming maliming modified the milestone: 7.4-patch Oct 12, 2023
@maliming maliming removed their assignment Oct 12, 2023
@maliming
Copy link
Member

This method has changed on 8.0.

#16610

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

2 participants