示例#1
0
 /// <summary>
 /// Default constructor.
 /// </summary>
 public BookService()
 {
     this._uowProvider           = new UnitOfWorkProvider();
     this._repoProvider          = new BookRepositoryProvider();
     this._publisherRepoProvider = new PublisherRepositoryProvider();
     this._authorRepoProvider    = new AuthorRepositoryProvider();
     this._tagRepoProvider       = new TagRepositoryServiceProvider();
 }
示例#2
0
 /// <summary>
 /// Constructor with dependency injection.
 /// </summary>
 public BookService(IUnitOfWorkProvider uowProvider,
                    IBookRepositoryProvider repoProvider, IPublisherRepositoryProvider publisherRepoProvider,
                    IAuthorRepositoryProvider authorRepoProvider, ITagRepositoryServiceProvider tagRepoProvider)
 {
     this._uowProvider           = uowProvider;
     this._repoProvider          = repoProvider;
     this._publisherRepoProvider = publisherRepoProvider;
     this._authorRepoProvider    = authorRepoProvider;
     this._tagRepoProvider       = tagRepoProvider;
 }