feat(ReadProfile): add logic to read buttons
This commit is contained in:
@@ -15,6 +15,7 @@ public static class DependencyInjection
|
||||
services.TryAddScoped<IProfileRepository, ProfileRepository>();
|
||||
services.TryAddScoped<IProfileObjRepository, ProfileObjRepository>();
|
||||
services.TryAddScoped<IStateRepository, StateRepository>();
|
||||
services.TryAddScoped<IButtonRepository, ButtonRepository>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WorkFlow.Application.Contracts.Repositories;
|
||||
using WorkFlow.Domain.Entities;
|
||||
|
||||
@@ -11,4 +12,6 @@ public class ButtonRepository : CRUDRepository<Button, int, WFDBContext>, IButto
|
||||
public ButtonRepository(WFDBContext dbContext) : base(dbContext, dbContext.Buttons)
|
||||
{
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Button>> ReadAllAsync(int profileId) => await _dbSet.Where(b => b.ProfileId == profileId).ToListAsync();
|
||||
}
|
||||
Reference in New Issue
Block a user