示例#1
0
 public FileValidationController(
     IFcsContext fcsContext,
     IOrganisationsContext organisationsContext,
     ILogger logger)
 {
     _fcsContext           = fcsContext;
     _organisationsContext = organisationsContext;
     _logger = logger;
 }
 public async Task <List <DataExtractFcsInfo> > GetFCSForDataExtractReport(IEnumerable <string> OrganisationIds, CancellationToken cancellationToken)
 {
     using (IFcsContext fcsContext = _fcsContextFunc())
     {
         return(await fcsContext.Contractors
                .Include(x => x.Contracts)
                .Where(x => OrganisationIds.Contains(x.OrganisationIdentifier, StringComparer.OrdinalIgnoreCase))
                .GroupBy(x => new { x.OrganisationIdentifier, x.Ukprn })
                .Select(x => new DataExtractFcsInfo
         {
             OrganisationIdentifier = x.Key.OrganisationIdentifier,
             UkPrn = x.Key.Ukprn
         }).ToListAsync(cancellationToken));
     }
 }
示例#3
0
 public ReferenceDataRepository(
     ILogger logger,
     IPostcodes postcodes,
     ILARS lars,
     IOrganisations organisations,
     IFcsContext fcsContext,
     IULN ulnContext)
 {
     _logger        = logger;
     _postcodes     = postcodes;
     _lars          = lars;
     _organisations = organisations;
     _fcsContext    = fcsContext;
     _ulnContext    = ulnContext;
 }
示例#4
0
 public FCSDataRetrievalService(IFcsContext fcs)
 {
     _fcs = fcs;
 }
 public FcsContractsPersistenceService(IFcsContext fcsContext)
 {
     _fcsContext = fcsContext;
 }
示例#6
0
 private FCSDataRetrievalService NewService(IFcsContext fcs = null, ICache <IMessage> messageCache = null)
 {
     return(new FCSDataRetrievalService(fcs, messageCache));
 }
示例#7
0
 private FCSDataService NewService(IFcsContext context)
 {
     return(new FCSDataService(context));
 }
示例#8
0
 private FCSDataRetrievalService NewService(IFcsContext fcs = null)
 {
     return(new FCSDataRetrievalService(fcs));
 }
示例#9
0
 public FCSDataService(IFcsContext fcsContext)
 {
     _fcsContext = fcsContext;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="FCSDataRetrievalService"/> class.
 /// </summary>
 /// <param name="fcs">The FCS.</param>
 /// <param name="messageCache">The message cache.</param>
 public FCSDataRetrievalService(IFcsContext fcs, ICache <IMessage> messageCache)
     : base(messageCache)
 {
     _fcs = fcs;
 }