Esempio n. 1
0
        public StandardRelationsInfo GetStandardRelations(Guid id)
        {
            using (var uow = Read())
            {
                var dataAccess  = new StandardDataAccess(uow);
                var relations   = dataAccess.GetStandardRelations(id);
                var authorities = new DataAccessBase <Data.AcademicBenchmark.Model.Authority>(uow).GetAll();
                var document    = new DocumentDataAccess(uow).GetAll();

                return(StandardRelationsInfo.Create(relations, authorities, document));
            }
        }
Esempio n. 2
0
        public IList <StandardRelationsInfo> GetStandardsRelations(IList <Guid> ids)
        {
            using (var uow = Read())
            {
                var result      = new List <StandardRelationsInfo>();
                var standardDA  = new StandardDataAccess(uow);
                var authorities = new DataAccessBase <Data.AcademicBenchmark.Model.Authority>(uow).GetAll();
                var docs        = new DocumentDataAccess(uow).GetAll();
                foreach (var id in ids)
                {
                    var relation = standardDA.GetStandardRelations(id);
                    result.Add(StandardRelationsInfo.Create(relation, authorities, docs));
                }

                return(result);
            }
        }