public List <ResourceEntity> GetResourcesByPartialUsername(string partUsername) { List <ResourceEntity> result = new List <ResourceEntity>(); ResourcesRepository resRepo = new ResourcesRepository(); using (var uow = UnitOfWork.CreateUoW()) { try { var resList = resRepo.GetResourcesByPartialUsername(partUsername, uow); result = resList.Select(x => EntitiesMapper.ToEntity(x)).ToList(); } catch (Exception ex) { DbLog.LogError("Error retrieving resources " + partUsername, ex); throw ex; } } return(result); }