/// <summary> /// Finds the run item. /// </summary> /// <param name="id">The id.</param> /// <returns></returns> /// <remarks></remarks> public DiagnosticsRunItem FindRun(string id) { var map = new DiagnosticsRunItemMapper(); var res = DiagnosticsRepositoryAgentFactory .CreateDiagnosticsRunRepositoryAgent() .SelectById(id); return((res != null) ? map.MapFromServiceToBusiness(res) : null); }
/// <summary> /// Gets the diagnostics run items for date. /// </summary> /// <param name="date">The date.</param> /// <returns></returns> /// <remarks></remarks> public DiagnosticsRunItem[] GetDiagnosticsRunItemsForDate(DateTime date) { using (var scp = new TransactionScope()) { var res = DiagnosticsRepositoryAgentFactory .CreateDiagnosticsRunRepositoryAgent() .SelectByDate(date); scp.Complete(); var map = new DiagnosticsRunItemMapper(); return(map.MapFromServiceToBusiness(res)); } }