This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public IEnumerable FindAll() | |
{ | |
using(IServiceFactory factory = new ServiceFactory(this.DirectoryPath)) | |
{ | |
ILogger logger = factory.Create(); | |
try | |
{ | |
using(IRepository repository = factory.Create(this.ConstructorImports)) | |
{ | |
List items = repository.FindAll(null).ToList(); | |
return items; | |
} | |
} catch (Exception ex) | |
{ | |
logger.LogError("Error when retrieving items.", ex); | |
return new List(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment