Open Closed

Generate static proxy not correct #9484


User avatar
0
hanntd created

Hi, I used this command to generate static proxy: abp generate-proxy -t csharp -u https://localhost:44366/ --without-contracts -m CoreBackend It ran with no error but some generated files cannot generate the correct method of endpoint, for example:

public virtual List<BankDto> GetExistingDataByField(string fieldName, string fieldValue, Guid docId)
{
    //Client Proxy does not support the synchronization method, you should always use asynchronous methods as a best practice
    throw new System.NotImplementedException(); 
}

Another question: can we just generate for some services or a specific service instead of generate for all?

Please find in the attached images I have enclosed sample files of application, contract and proxy files.


3 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Client Proxy does not support the synchronization method, you should always use asynchronous methods as a best practice

    Can you use async method(return type is Task or Task<>) and add Async to end of your method name(GetExistingDataByFieldAsync)?

    Thanks.

  • User Avatar
    0
    hanntd created

    I added Async to end of my method name and already resolved my issue. Thanks

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    Great

Learn More, Pay Less
33% OFF
All Trainings!
Get Your Deal
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on December 25, 2025, 06:16
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.