Questions tagged [domainservices]

Domain services are Windows Communication Foundation (WCF) services that encapsulate the business logic of a WCF RIA Services application. A domain service exposes a set of related operations in the form of a service layer. When you define a domain service, you specify the data operations that are permitted through the domain service.

When designing a domain service, you should think of the domain service as a set of related tasks that you expect users to perform in your application. Typically, such tasks involve a small group of closely-related entities. For example, in an expense reporting application, you might expose entities for expense reports, line items, and details. You might, then, place entities for accounts and payments in a separate domain service.

180 questions
9
votes
4 answers

Good naming for domain services layer

Abstract Which name is better? Domain.PersonService DomainServices.PersonService DomainServices.PersonDomainService (consider some longer names like PersonDomainServiceModelDecorator) or something else? Situation We have a framework in which there…
Amir Karimi
  • 5,401
  • 4
  • 32
  • 51
9
votes
4 answers

Injecting domain service into the AggregateRoots in DDD

The commonly known advise in DDD is that an Aggregate Roots don't user a domain service. The domain service is to coordinate two Aggregate Roots to achieve a behavior. It really surprised me when I saw this blog written by Rinat Abdullin with the…
wonderful world
  • 10,969
  • 20
  • 97
  • 194
7
votes
4 answers

Determine current domain controller programmatically

I need to query current domain controller, probably primary to change user password. (P)DC name should be fully qualified, i.e. DC=pdc,DC=example,DC=com (how to properly name such notation?) How can it be done using C#?
abatishchev
  • 98,240
  • 88
  • 296
  • 433
6
votes
3 answers

MVC - Domain Service takes charge of filtering or does Repository Layer?

Should I be filtering my IQueryable results from the Domain Service? For example... My 3 portals (Websites) access the same Domain Service Layer, depending on the type of user it is, I call a specific repository method and return the result,…
Haroon
  • 3,402
  • 6
  • 43
  • 74
6
votes
1 answer

WCF Ria Services ChangeSet.GetOriginal(): How does it work?

I have a fairly simple question to which I cannot seem to find the answer for. I have a silverlight app with Ria Services. In the DomainService class I have an update method like below: public void UpdateConversationState(ConversationState…
Sander_V
  • 103
  • 1
  • 5
5
votes
2 answers

Silverlight Security Context

I am wondering whether Silverlight has a security context where you can flag portions of the code with [PrincipalPermission(SecurityAction.Demand, Role = "Administrator")]. From all the research I've gathered so far is that in order to obtain a…
5
votes
2 answers

Where is System.ServiceModel.DomainServices.EntityFramework DLL?

I'm trying to use RIA services, I installed Silverlight 4 and Silverlight 4 Tools/SDK, but I cannot setup a LINQToEntitiesDomainService because I can't find this namespace/assembly: System.ServiceModel.DomainServices.EntityFramework. Where does…
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
4
votes
1 answer

Silverlight + RIA Entity Domain Service best practice: How many entities per domain?

I have a database with a gazillion entities, I watched Tim Heuer's video about Silverlight & RIA Services, and he explained how to generate a DomainService. My question is, should I use many domain services for each entity or merge them all along…
Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
3
votes
1 answer

Can domain event be raised in domain service?

I'm wondering if domain event can be raised in domain service? I've got such a code written in C#. Of course it works, but is it correct from DDD point of view? First example is related to user deletion. In my system Account has multiple users.…
3
votes
1 answer

What is meant by "Domain Services"?

I am unable to get clear picture of Domain Services when studying about WCF RIA services. Can anyone explain to me what the role of domain services is?
iti
  • 203
  • 3
  • 5
  • 16
3
votes
1 answer

Entity Framework 4 and SQL Server 2008 R2 Change Data Capture Not Playing Nicely Together

When I try to use these two features together, I get a compilation error on my model (note, I've renamed the entity for my _CT table "ContentHistory" and my SL4 Unit Test project is called "DomainServices.UnitTest": Error 39 Property…
3
votes
1 answer

Returning Associated Members via Ria DomainService Invoke Method

I got this DomainService method I'm calling from my SL ViewModel using the Invoke attribute: [Invoke] public ServiceModel.Recipy GetRecipyById(int recipyId) { return new Recipy { RecipyId = 1, …
3
votes
2 answers

Silverlight - created a new domainservice but how do I access it from client?

I have used the SL business application template and added a new blank, empty domain service in my Services folder on the .Web part of the solution. The class is DomainService1 and inherits from DomainService. It contains one method: public class…
Calanus
  • 25,619
  • 25
  • 85
  • 120
2
votes
1 answer

DDD: The problem with domain services that need to fetch data as part of their business rules

Suppose I have a domain service which implements the following business rule / policy: If the total price of all products in category 'family' exceeds 1 million, reduce the price by 50% of the family products which are older than one year. Using…
domin
  • 1,192
  • 1
  • 7
  • 28
2
votes
1 answer

what is the best way to restrict services for certain users

EDIT: reworded and simplified question to be consise... In my service layer I have something like GetAllMessages(string userid); I could have various types of users on my system like Clients / Supplier etc... This service is only available to all…
Haroon
  • 3,402
  • 6
  • 43
  • 74
1
2 3
11 12