Add Domain project and shifted handlers to application.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using FinancialApi.Application;
|
||||
using FinancialApi.Domain;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FinancialApi.Infrastructure;
|
||||
|
||||
public class AccountQuery(AccountDbContext db) : IAccountQuery
|
||||
{
|
||||
public Task<Account?> FindByIdAsync(int id)
|
||||
{
|
||||
return db.Accounts.AsNoTracking().FirstOrDefaultAsync(x => x.Id == id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user