introduce ITransientService interface for auto registration of transient services (for DBContexts and Repositories)
This commit is contained in:
@ -11,7 +11,7 @@ using Oqtane.Repository.Databases.Interfaces;
|
||||
namespace Oqtane.Modules.HtmlText.Repository
|
||||
{
|
||||
[PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
|
||||
public class HtmlTextContext : DBContextBase, IService, IMultiDatabase
|
||||
public class HtmlTextContext : DBContextBase, ITransientService, IMultiDatabase
|
||||
{
|
||||
public HtmlTextContext(ITenantManager tenantManager, IHttpContextAccessor httpContextAccessor) : base(tenantManager, httpContextAccessor) { }
|
||||
|
||||
|
@ -1,13 +1,11 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Linq;
|
||||
using Oqtane.Modules.HtmlText.Models;
|
||||
using Oqtane.Documentation;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Oqtane.Modules.HtmlText.Repository
|
||||
{
|
||||
[PrivateApi("Mark HtmlText classes as private, since it's not very useful in the public docs")]
|
||||
public class HtmlTextRepository : IHtmlTextRepository, IService
|
||||
public class HtmlTextRepository : IHtmlTextRepository, ITransientService
|
||||
{
|
||||
private readonly HtmlTextContext _db;
|
||||
|
||||
|
Reference in New Issue
Block a user