/// <summary> /// Default constructor. /// </summary> /// <param name="api">The current api</param> /// <param name="db">The current db connection</param> /// <param name="factory">The current content service factory</param> /// <param name="cache">The optional model cache</param> public PostRepository(IApi api, IDb db, IContentServiceFactory factory, ICache cache = null) { this.db = db; this.api = api; this.contentService = factory.CreatePostService(); this.cache = cache; }
/// <summary> /// Default constructor. /// </summary> /// <param name="api">The current api</param> /// <param name="db">The current db connection</param> /// <param name="factory">The current content service factory</param> /// <param name="cache">The optional model cache</param> public PostRepository(IApi api, IDb db, IContentServiceFactory factory, ICache cache = null) { _db = db; _api = api; _contentService = factory.CreatePostService(); _cache = cache; }
/// <summary> /// Default constructor. /// </summary> /// <param name="db">The current db connection</param> /// <param name="factory">The current content service factory</param> public PostRepository(IDb db, IContentServiceFactory factory) { _db = db; _contentService = factory.CreatePostService(); }
/// <summary> /// Default constructor. /// </summary> /// <param name="api">The current api</param> public PostController(IApi api, PostEditService editService, IContentServiceFactory factory, IHubContext <Hubs.PreviewHub> hub) : base(api) { this.editService = editService; this.contentService = factory.CreatePostService(); _hub = hub; }
/// <summary> /// Default constructor. /// </summary> /// <param name="api">The current api</param> public PostController(IApi api, PostEditService editService, IContentServiceFactory factory) : base(api) { this.editService = editService; this.contentService = factory.CreatePostService(); }
public PostEditService(IApi api, IContentServiceFactory factory) { this.api = api; service = factory.CreatePostService(); }