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)); }
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()); } }