-
Notifications
You must be signed in to change notification settings - Fork 2
How to create Application Service
marektihkan edited this page Sep 13, 2010
·
1 revision
- Create__Application Service__ interface to
Core.(BoundedContext).Services
namespace - Create implementation to
Services
namespace - Register Application Service to Service Locator if needed
- Use constructor for dependencies
namespace ExampleSolution.Core.Parties.Services
{
public interface IAuthenticationService
{
Account Register(Person person);
Account Authenticate(string username, string hash);
void Disable(Account account);
void Enable(Account account);
}
}
namespace ExampleSolution.Services
{
public class AuthenticationService : IAuthenticationService
{
public AuthenticationService(IRegistationService registration, IAuthenticationTask authentication, ILogger logger)
{
//...
}
public Account Register(Person person)
{
//...
}
Account Authenticate(string username, string hash);
{
//...
}
void Disable(Account account);
{
//...
}
void Enable(Account account);
{
//...
}
}
}