public Model.SystemModule GetModuleById(int id) { var m = _repository.GetById(mo => mo.ModuleId == id); return(new Model.SystemModule() { CreatedDate = m.CreatedDate, IsActive = m.IsActive, ModuleId = m.ModuleId, ModuleName = m.ModuleName }); }
public IEnumerable <Model.RolesModulesMapping> GetRoleModulesMappingsList() { return(mappingRepo.GetAll().Select(m => new Model.RolesModulesMapping() { CanDelete = m.CanDelete, CanNavigate = m.CanNavigate, CanRead = m.CanRead, CanWrite = m.CanWrite, CreatedBy = m.CreatedBy, CreatedDate = m.CreatedDate, FullControll = m.FullControll, MappingId = m.MappingId, ModuleId = m.ModuleId, RoleId = m.RoleId, ModuleName = moduleRepo.GetById(mod => mod.ModuleId == m.ModuleId).ModuleName, RoleName = rolesRepository.GetById(rol => rol.RoleId == m.RoleId).RoleName, ViewName = viewsRepository.GetById(view => view.ViewId == m.ViewId).ViewName })); }