About the service layer!

Jan 30, 2015 at 11:24 AM
Dear,

Thanks for the good framework templates. I'm working on it and implement your framework for my project now. But i'm still so confusing:

1/ About the service layer: we have the generic service layer, right? so do i have to create each entity layer that inherited from IService and do i have to overriding all the members of generic service?
For example: i have many entity on my project and the Function Entity, so for Function entity do i have to create the FunctionService like that:
public class FunctionService : Service<Function>
{
    public FunctionService(IRepositoryAsync<Function> repository) : base(repository)
    {
    }
}
and override all members from generic service class? please explain to me because i'm just the new .net coding and i already read your post many many time but still so confused :)

Cheers
Coordinator
Feb 12, 2015 at 7:39 PM
You only need to over ride these methods if your are needing to add any business logic (pre/post) processing for any CRUD, if you don't just use the implementation as is. The service layer is simply a layer/place holder for when you need to add business logic/fascade.
Marked as answer by lelong37 on 2/12/2015 at 11:39 AM