public static ProcessingAtlasRepository GetProcessingAtlasRepository(IUnitOfWork unitOfWork) { var repository = new ProcessingAtlasRepository(); repository.UnitOfWork = unitOfWork; return(repository); }
public ExecuteResultEntity <Guid> GetProcessingAtlasId(string ProcessingAtlas) { try { ProcessingAtlasRepository repo = RepositoryHelper.GetProcessingAtlasRepository(); database = repo.UnitOfWork; var result = repo.Where(w => w.Name == ProcessingAtlas); if (result.Any()) { return(ExecuteResultEntity <Guid> .CreateResultEntity(result.Single().Id)); } return(ExecuteResultEntity <Guid> .CreateResultEntity(Guid.Empty)); } catch (Exception ex) { return(ExecuteResultEntity <Guid> .CreateErrorResultEntity(ex)); } }