コード例 #1
0
        public static ProcessingAtlasRepository GetProcessingAtlasRepository(IUnitOfWork unitOfWork)
        {
            var repository = new ProcessingAtlasRepository();

            repository.UnitOfWork = unitOfWork;
            return(repository);
        }
コード例 #2
0
ファイル: BOMController.cs プロジェクト: ediux/tokiku2
        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));
            }
        }