Base solution for your next web application
Open Closed

abp.services generated proxy has casing issue when generated from Power Tools #8767


User avatar
0
hamberg created

Hello,

Project: MVC JQuery
Power Tool: 2.2.0.4

I found that if I generate an entity with a prefix like JJComputerSystem the power tools creates an Index.min.js that has

var _jjComputerSystemService = abp.services.app.jjComputerSystem;

This then fails because abp.services.app.jjComputerSystem is then undefined

I then debug to find that that generated service proxie is abp.services.app.jJComputerSystem. I make that change to the file and now it works. The issues is that is a generated service proxie and I can't find anywhere that has "jJComputerSystem" Everthing in code for the application and controller either has JJComputerSystem or jjComputerSystem. Where in my project can I find where abp.services.app.jJComputerSystem gets that name from?

Thanks


5 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team

    hI hamberg

    This should be a problem of naming conversion, I will check it, thanks

  • User Avatar
    0
    maliming created
    Support Team

    The issues is that is a generated service proxie and I can't find anywhere that has "jJComputerSystem" Everthing in code for the application and controller either has JJComputerSystem or jjComputerSystem. Where in my project can I find where abp.services.app.jJComputerSystem gets that name from?

    Dynamic proxy scripts are generated based on application services.

    https://aspnetboilerplate.com/Pages/Documents/AspNet-Core#application-services-as-controllers https://aspnetboilerplate.com/Pages/Documents/Dynamic-Web-API

  • User Avatar
    0
    hamberg created

    Hello maliming,

    I did check that and that is how I figured out that it is failing. The dynamically generated abp.services.app creates “jJComputerSystem”. I then went in and created an entity of all lower case prefix of jjComputerSystem and it dynamically generated abp.services.app creates “jjComputerSystem” which is correct and works. I then tried other two digit prefixes and they had the same problem if I made both of them CAPS like JJ{entity} or MM{entity}. It is dynamically creating them wrong so I was trying to find the file that creates the list of abp.services.app.{service} but I could not find that. I am just trying to add a prefix the way your tables are setup with a App prefix I was making “JJ” prefix so it is easy to find in the db.

    I am new to AspNet Zero and this is my first project using it so I apologize if I am calling things by the wrong name. I have always put things in MVVM pattern using controllers with everything coded and not dynamically created. I like your way better than the way I used to do it!

    Howie

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @hamberg,

    This seems like a bug. Could you create the same issue on GitHub, so we can fix it ? You can create the issue here https://github.com/aspnetzero/aspnet-zero-core/issues/.

    Thanks,

  • User Avatar
    0
    maliming created
    Support Team

    I remember this problem was solved, I will ask @yekalkan