Files
silver-octo-spoon/wolverine/a-frame-architecture/FinancialApi.Infrastructure/AccountQuery.cs
T

13 lines
343 B
C#

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);
}
}