You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an existing project which follows clean architecture layered project approach. I like to add DataSyncAPIs to my API project. My API project doesn't directly reference the Infrastructure(Domain) project. The hierarchy is as follows
API -->Application.Contracts (interface) --> Application --> Domain
The SyncAPI as below. I do not have access to "MyTable" at my API level . I'm using Auto-Mapper in my application layer to map the objects. What's the best way to deal with it ?
[Route("api/tables/[controller]")] [ApiController] public class MyTableController : TableController<MyTable> { private readonly ILogger<MyTableController> _logger; public MyTableController( AppServerDbContext context , ILogger<MyTableController> logger) : base() { Repository = new EntityTableRepository<MyTable>(context); RepositoryUpdated += OnRepositoryUpdated; Options = new TableControllerOptions { PageSize = 1000, EnableSoftDelete = true, }; Logger = logger; }
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have an existing project which follows clean architecture layered project approach. I like to add DataSyncAPIs to my API project. My API project doesn't directly reference the Infrastructure(Domain) project. The hierarchy is as follows
API -->Application.Contracts (interface) --> Application --> Domain
The SyncAPI as below. I do not have access to "MyTable" at my API level . I'm using Auto-Mapper in my application layer to map the objects. What's the best way to deal with it ?
[Route("api/tables/[controller]")]
[ApiController]
public class MyTableController : TableController<MyTable>
{
private readonly ILogger<MyTableController> _logger;
public MyTableController(
AppServerDbContext context
, ILogger<MyTableController> logger) : base()
{
Repository = new EntityTableRepository<MyTable>(context);
RepositoryUpdated += OnRepositoryUpdated;
Options = new TableControllerOptions {
PageSize = 1000,
EnableSoftDelete = true,
};
Logger = logger;
}
internal void OnRepositoryUpdated(object sender, RepositoryUpdatedEventArgs e) { } }
Beta Was this translation helpful? Give feedback.
All reactions