Пример #1
0
        public virtual async Task <TDomain> Add(TDomain entity, Action <TDomain> preProcessAction, Action <TDomain> postProcessAction = null)
        {
            if (entity == null)
            {
                ThrowExceptionForNullInputEntity();
            }

            preProcessAction?.Invoke(entity);

            var returnVal = await EntityDataService.Add(entity);

            postProcessAction?.Invoke(returnVal);

            return(returnVal);
        }
Пример #2
0
 protected virtual async Task CreateTestEntityToStore(TEntity testEntity)
 {
     await _dataService.Add(testEntity);
 }