question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Domain services documentation queries....

See original GitHub issue

Hi,

I have read http://aspnetboilerplate.com/Pages/Documents/Domain-Services and a few things are a little unclear to me.

  1. You make reference to ITaskPolicy which is never implemented. I am assuming:
    taskPolicy.CheckIfCanAssignTaskToPerson();

is the code?

image

Might be worth showing the implementation.

  1. After “creating” the domain service “TaskManager” you then don’t actually use it in your Entity method:
public class Task : Entity<long>
{
    public virtual int? AssignedPersonId { get; protected set; }

    //...other members and codes of Task entity

    public void AssignToPerson(Person person, ITaskPolicy taskPolicy)
    {
        taskPolicy.CheckIfCanAssignTaskToPerson(this, person);

        AssignedPersonId = person.Id;
    }
}

shouldn’t this be:

public class Task : Entity<long>
{
    public virtual int? AssignedPersonId { get; protected set; }

    //...other members and codes of Task entity

    public void AssignToPerson(Person person, ITaskPolicy taskPolicy)
    {
        _TaskManager.AssignTaskToPerson(this, person, taskPolicy);
    }
}

because then you would reuse same in say a staff entity that had a reference to a person entity as:

public class Staff : Entity<long>
{
     public virtual Person { get; set; }

    public void AssignTask(Task task, ITaskPolicy taskPolicy)
    {
        _TaskManager.AssignTaskToPerson(task, this.Person, taskPolicy);
    }
}

My understanding being that the purpose of a domain service it to actually do the domain operations. Have them all centralised and not replicated in the implementation of the entities themselves.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hikalkancommented, Aug 20, 2015

Thank you very much for you good sayings. I’m motivated when reading such comments. I left my job to work on these projects. So, I believe that they will be much better by the time 😃

0reactions
natikicommented, Aug 20, 2015

Hi,

Thanks for getting back to me. I am also still learning DDD so am no expert.

Just wanted to say again a big thanks for making ABP available. It is great and has made my life a heap easier. I am getting it deployed across a number of new developments and it has been invaluable in getting those going quickly and “in good practice”. This has been especially helpful for junior developers who have not got a heap of design/architecture experience. The great thing is that you have documented stuff as you go so there is good documentation to support it all as well.

I am also now looking at module zero (free version) to handle a new multi-tenant requirement and it looks like it is as good as ABP ie. Does what you need and does not try and do everything and get in the way. So thanks again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Overview of Azure Active Directory Domain Services
In this overview, learn what Azure Active Directory Domain Services provides and how to use it in your organization to provide identity ...
Read more >
An Introduction to Manual Active Directory Querying with ...
Dsquery is a command line utility and requires the following: Active Directory Domain Services (AD DS) server role installed (i.e., there must ...
Read more >
Querying Resources, Services, Documentation, and ...
Querying Resources, Services, Documentation, and Marketplace · Running a Custom, Free-Form Query · Running a Sample Query · Listing Resource-Types ...
Read more >
Configuring Azure AD DS
Please note that Azure Active Directory Domain Service (AD DS) can be ... Configure Listener to use LDAP Queries for Cisco Email Security...
Read more >
Search Domain Services - openBIS Documentation Rel. ...
Querying a Service. Search domain services can be accessed via IGeneralInformationService . The method listAvailableSearchDomains returns all ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found