Esempio n. 1
0
        public IEnumerable <TagDTO> GetAcknowledgementTags(int acknowledgementId)
        {
            IEnumerable <Tag> tags;

            using (var context = new AcknowledgementsTrackerContext())
            {
                context.Database.Log = message => Debug.WriteLine(message);
                var acknowledgement = context.Acknowledgements.Find(acknowledgementId);
                tags = acknowledgement.Tags;
            }

            return(assembler.AssembleCollection(tags));
        }
Esempio n. 2
0
        public IEnumerable <AcknowledgementDTO> GetAll()
        {
            using (var context = new AcknowledgementsTrackerContext())
            {
                context.Database.Log = message => Debug.WriteLine(message);
                var acknowledgements = context.Acknowledgements.ToList();

                return(acknowledgementsAssembler.AssembleCollection(acknowledgements)
                       .ToList());
            }
        }