示例#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);
 }