Domain services documentation queries....
See original GitHub issueHi,
I have read http://aspnetboilerplate.com/Pages/Documents/Domain-Services and a few things are a little unclear to me.
- You make reference to ITaskPolicy which is never implemented. I am assuming:
taskPolicy.CheckIfCanAssignTaskToPerson();
is the code?
Might be worth showing the implementation.
- 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:
- Created 8 years ago
- Comments:5 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 😃
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.