Black Friday Sale!
Save up to 50% off any plans! Valid from 23 Nov to 30 Nov - Also valid for the existing customers
Open Closed

Service vs Manager - Where do I create my code ? #2213

maxmjbn created

I've read many pages on Service vs Manager and checked the code but I'm not sure I get the difference between the Service and the Manage in ABP.

Here is my specific case: I have a "Function" object. A Function can have a list of Parameters.

When I insert a function in the database, I also insert its parameters at the same time.

How should that be handled? I already have a FunctionAppService that creates the function in the database. Now, how about the parameters. Should they be handled via their repository in the CreateOrEdit() method in the FunctionAppService ? Should I create a ParameterAppService even if entering only parameters doesn't make any sense because it is always linked to a function ?

Should the "Manager" play a role here ? I doubt it because the Manager cannot call the AppService because of the way the projects are linked (and we want to avoid circular reference).

I'm confused with the structure. I need some guidance!

2 Answer(s)
  • 0
    ismcagdas created
    Support Team


    Manager's are considered as Domain Services, you can read about it here <a class="postlink" href=""> ... n-Services</a>.

    In order to understand difference, I suggest you to read this document as well if you have time <a class="postlink" href=""> ... n-Services</a>.

    In your case, it seems like Parameter entity is only meaningful with a Fucntion and Function is your aggregate root. So, you can save parameters with function in your FunctionAppService, you dont't need to create a second AppService for parameter.

  • 0
    maxmjbn created

    Thank you for the links to the documentation.

    Your suggestion seems to make sense and this is what I'll do. :D