public BookStoreMutation(IAuthorManager authorManager, IBookManager bookManager) { Field <AuthorType>( "addAuthor", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <AuthorInputType> > { Name = "author" }), resolve: context => { var author = context.GetArgument <Author>("author"); return(authorManager.Add(author)); }); Field <BookType>( "addBook", arguments: new QueryArguments( new QueryArgument <NonNullGraphType <BookInputType> > { Name = "book" }), resolve: context => { var book = context.GetArgument <Book>("book"); return(bookManager.Add(book)); }); }
private void SetAuthorTo(IAuthorManager authorManager, BookViewModel add) { IDConversionDao idcDao = new IDConversionDao(); AuthorDao authorDao = new AuthorDao(); var idc = idcDao.FindBy(new Dictionary <string, object>() { { "TableName", "Author" }, { "ForeignID", add.AuthorID } }, _dataOpUnit.CurrentConnection); if (idc.Count() == 1) { add.Author = authorDao.FindBy(new Dictionary <string, object>() { { "ID", idc.Single().DomesticID } }, _dataOpUnit.CurrentConnection).SingleOrDefault().ToViewModel(); } else { add.Author = authorDao.FindBy(new Dictionary <string, object>() { { "ID", add.AuthorID } }, _dataOpUnit.CurrentConnection).SingleOrDefault().ToViewModel(); } authorManager.ObserveAuthorCount(); }
public BookStoreQuery(IAuthorManager authorManager, IBookManager bookManager) { Field <ListGraphType <AuthorType> >( "all_authors", resolve: context => authorManager.GetAll()); Field <AuthorType>( "author_by_id", arguments: new QueryArguments(new QueryArgument <IntGraphType> { Name = "id" }), resolve: context => authorManager.GetById(context.GetArgument <int>("id"))); Field <AuthorType>( "get_error", resolve: context => authorManager.GetError()); Field <ListGraphType <BookType> >( "all_books", resolve: contex => bookManager.GetAll()); Field <BookType>( "book_by_id", arguments: new QueryArguments(new QueryArgument <IntGraphType> { Name = "id" }), resolve: context => bookManager.GetById(context.GetArgument <int>("id"))); }
public AuthorsController(IAuthorManager authorManager, UserManager <User> userManager, IMapper mapper) { _authorManager = authorManager; _mapper = mapper; _userManager = userManager; }
public AuthorAppService( IAuthorManager authorManager, IRepository <Author, long> authorsRepository) { _authorManager = authorManager; _authorsRepository = authorsRepository; }
public AuthorController( IAuthorManager authorManager, ILogger <AuthorController> logger) { this.authorManager = authorManager; this.logger = logger; }
public BookController(ISearchBookManager searchBookManager, IBookManager bookInfoManager, IAuthorManager authorManager, IBookAuthorManager bookauthorManager, IConsignmentManager consignmentManager) { this.searchBookManager = searchBookManager; this.bookInfoManager = bookInfoManager; this.authorManager = authorManager; this.bookauthorManager = bookauthorManager; this.consignmentManager = consignmentManager; }
//.NET core dependency injection will inject my dependency public AuthorController(IAuthorManager authorManager, IStringLocalizer <AuthorController> localizer, IStringLocalizer <Shared> sharedLocalizer) { this.authorManager = authorManager; this.localizer = localizer; this.sharedLocalizer = sharedLocalizer; }
public ThongKeNhuanButController(IAuthorManager authorManager, IThongKeNhuanButManager thongKeNhuanButManager, IAccountsManager accountsManager, ITypesManager typesManager, ITheLoai_HeSoManager theLoai_HeSoManager) { this._thongKeNhuanButManager = thongKeNhuanButManager; this._accountsManager = accountsManager; this._typesManager = typesManager; this._theLoai_HeSoManager = theLoai_HeSoManager; this._authorManager = authorManager; }
public VideosController(IVideoManager videoManager, IAuthorManager authorManager, IGenreManager genreManager, UserManager <User> userManager, IMapper mapper) { _genreManager = genreManager; _authorManager = authorManager; _videoManager = videoManager; _mapper = mapper; _userManager = userManager; }
public AuthorController(IAuthorManager authorManager, IMapper mapper, IHttpClientFactory httpClientFactory) { Guard.Against <ArgumentNullException>(authorManager == null, nameof(authorManager)); Guard.Against <ArgumentNullException>(mapper == null, nameof(mapper)); Guard.Against <ArgumentNullException>(httpClientFactory == null, nameof(httpClientFactory)); _authorManager = authorManager; _mapper = mapper; _httpClientFactory = httpClientFactory; }
public BooksController(IBookCategoryManager iBookCategoryManager, IAuthorManager iAuthorManager, ILanguageManager iLanguageManager, IPublisherManager iPublisherManager, IBookManager iBookManager) { _iLanguageManager = iLanguageManager; _iBookCategoryManager = iBookCategoryManager; _iAuthorManager = iAuthorManager; _iPublisherManager = iPublisherManager; _iBookManager = iBookManager; }
public ItemController(IItemManager itemManager, IBookManager bookInfoManager, IMagazineManager magazineManager, IDiskManager diskManager, IAuthorManager authorManager, IBookAuthorManager bookauthorManager, IRecommendationManager recommendationManager) { this.itemManager = itemManager; this.bookInfoManager = bookInfoManager; this.diskManager = diskManager; this.magazineManager = magazineManager; this.authorManager = authorManager; this.bookauthorManager = bookauthorManager; this.recommendationManager = recommendationManager; }
public CommentsController(ICommentManager commentManager, IAuthorManager authorManager) { _commentManager = commentManager; _authorManager = authorManager; }
public AuthorsController(IAuthorManager iAuthorManager) { _iAuthorManager = iAuthorManager; }
private void SetupTestEnv() { InsertSeedRecords(); _testValidator = FakeAuthorValidator; _authorManager = new AuthorManager(AuthorRepository, _testValidator); }
public AuthorAppService(IAuthorManager authorManager) { _authorManager = authorManager; }
private void SetupTestEnv() { InsertSeedRecords(); _validator = new AuthorValidator(AuthorRepository); _manager = new AuthorManager(AuthorRepository, _validator); }
public AuthorController(IAuthorManager manager) { authorManager = manager; }
public AuthorController(IAuthorManager authorManager) { _authorManager = authorManager; }
public AuthorAppService(IAuthorManager authorManager, IObjectMapper objectMapper) { _authorManager = authorManager; _objectMapper = objectMapper; }
public BookController(IBookManager serv, IAuthorManager authorServ) { bookService = serv; authorService = authorServ; }
public AuthorController(IAuthorManager serv) { authorService = serv; }
public AuthorsController(IAuthorManager authorManager) { this.authorManager = authorManager; }
public BooksController(IBookManager bookManager, IAuthorManager authorManager, IHubContext <BookHub> bookHub) { this.bookManager = bookManager; this.authorManager = authorManager; this.bookHub = bookHub; }
public AuthorController() { authorManager = new SqlAuthorManager(); }
public AuthorListModel(IAuthorManager manager) { this.manager = manager; }
public AuthorApiController(IAuthorManager authorManager) { this.authorManager = authorManager; }
public AuthorController(FitnesDbContext context, IAuthorManager manager) { _manager = manager; _context = context; }
public AuthorController(IAuthorManager authorManager, IMapper mapper) { _authorManager = authorManager; _mapper = mapper; }
public BlogManager(IBlogRepository repo) { this._repo = repo; this._authorManager = new AuthorManager(this._repo); this._post_time_Manager = new PostTimeManager(); }