using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EntityDAL.Respostories;
using ViewModels;

namespace BLL
{
    public interface IRoles
    {
        IList<RoleViewModel> GetRoles();
        void UpdateRole(RoleViewModel roleViewModel);
    }

    public class Roles : IRoles
    {
        private readonly IRoleRepository _roleRepository;

        public Roles()
        {
            _roleRepository = new Repository();
        }

        #region Implementation of IRoles

        public IList<RoleViewModel> GetRoles()
        {
            return _roleRepository.GetRoles();
        }

        public void UpdateRole(RoleViewModel roleViewModel)
        {
            _roleRepository.UpdateRole(roleViewModel);
        }

        #endregion
    }
}
