Esempio n. 1
0
        public async Task <ILookup> GetByCode(ISettings settings, Guid domainId, string code)
        {
            Lookup     result = null;
            LookupData data   = await _dataFactory.GetByCode(_settingsFactory.CreateDataSettings(settings), domainId, code);

            if (data != null)
            {
                result = new Lookup(data, _dataSaver, _lookupHistoryFactory);
            }
            return(result);
        }
Esempio n. 2
0
        public async Task <IItem> GetByCode(ISettings settings, Guid domainId, string code)
        {
            Item     result = null;
            ItemData data   = await _dataFactory.GetByCode(_settingsFactory.CreateDataSettings(settings), domainId, code);

            if (data != null)
            {
                result = new Item(data, _dataSaver, _itemHistoryFactory);
            }
            return(result);
        }
Esempio n. 3
0
 public async Task <IEnumerable <ILookupHistory> > GetByLookupId(ISettings settings, Guid lookupId)
 {
     return((await _dataFactory.GetByLookupId(_settingsFactory.CreateDataSettings(settings), lookupId))
            .Select <LookupHistoryData, ILookupHistory>(data => new LookupHistory(data))
            );
 }
Esempio n. 4
0
 public async Task <IEnumerable <IItemHistory> > GetByItemId(ISettings settings, Guid itemId)
 {
     return((await _dataFactory.GetByItemId(_settingsFactory.CreateDataSettings(settings), itemId))
            .Select <ItemHistoryData, IItemHistory>(data => new ItemHistory(data)));
 }