using MisIngredientesVue.Core.Models; using System.Collections.Generic; using System.Threading.Tasks; namespace MisIngredientesVue.Core.Services { public interface IUserRolesService { Task CreateRole(string tenantId, int createdById, UserRole userRole); Task> GetRoles(string tenantId); Task UpdateRole(string tenantId, int createdById, UserRole userRole); } public class UserRolesService : IUserRolesService { private readonly IRepository _repository; public UserRolesService(IRepository repository) { _repository = repository; } public async Task CreateRole(string tenantId, int createdById, UserRole userRole) { return await _repository.Insert(tenantId, createdById, userRole); } public async Task> GetRoles(string tenantId) { return await _repository.FindAll(tenantId); } public async Task UpdateRole(string tenantId, int createdById, UserRole userRole) { await _repository.Update(tenantId, createdById, userRole); } } }